You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "boekkooi-lengoo (via GitHub)" <gi...@apache.org> on 2023/03/10 09:55:35 UTC

[GitHub] [apisix] boekkooi-lengoo opened a new issue, #9051: help request: Lots of `load(): new plugins` logs

boekkooi-lengoo opened a new issue, #9051:
URL: https://github.com/apache/apisix/issues/9051

   ### Description
   
   Good day,
   
   I currently have APISIX 3.2.0 deployed in standalone mode and I keep seeing the following logs every minute. 
   As this is a warning I would like to understand why this is logged and how I can resolve the warning.
   Could someone please give me a hand?
   
   ```
   2023/03/10 09:32:35 [warn] 51#51: *109892 [lua] plugin.lua:252: load_stream(): new plugins: {}, context: ngx.timer
   2023/03/10 09:32:35 [warn] 51#51: *109892 [lua] plugin.lua:202: load(): new plugins: {"openid-connect":true,"jwt_consumer":true,"redirect":true,"opentelemetry":true,"proxy-control":true,"proxy-rewrite":true,"proxy-rewrite-uri":true,"prometheus":true,"cors":true,"response-rewrite":true}, context: ngx.timer
   ```
   
   [apisix.yaml.txt](https://github.com/apache/apisix/files/10940780/apisix.yaml.txt)
   [config.yaml.txt](https://github.com/apache/apisix/files/10940805/config.yaml.txt)
   
   
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.2.0
   - Docker image: [apache/apisix:3.2.0-debian](https://hub.docker.com/layers/apache/apisix/3.2.0-debian/images/sha256-95c22adf9abddad8d6c4744e201b0d8c7a3cb2e3f35c39c3f6889d22f5c7ebed?context=explore)
   - Operating system (run `uname -a`): Linux api-gateway-6ff94d9575-xk9mj 5.10.161+ #1 SMP Thu Jan 5 22:49:42 UTC 2023 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx version: openresty/1.21.4.1
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): None
   - APISIX Dashboard version, if relevant: None
   - Plugin runner version, for issues related to plugin runners: None
   - LuaRocks version, for installation issues (run `luarocks --version`): Not sure.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "tokers (via GitHub)" <gi...@apache.org>.
tokers commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1463559123

   @boekkooi-lengoo These messages are harmless.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1466333390

   The logic is here: https://github.com/apache/apisix/blob/master/apisix/core/config_yaml.lua#L131
   If the file doesn't change, it should not reload.
   Would you like to sovle this problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] help request: Lots of `load(): new plugins` logs [apisix]

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 closed issue #9051: help request: Lots of `load(): new plugins` logs
URL: https://github.com/apache/apisix/issues/9051


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] boekkooi-lengoo commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "boekkooi-lengoo (via GitHub)" <gi...@apache.org>.
boekkooi-lengoo commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1463564169

   @tokers Ca you explain why they are harmless and if they are should they maybe be moved to a lower level?
   
   As the message is coming from https://github.com/apache/apisix/blob/master/apisix/plugin.lua#L202 which seems to unload plugins on [line 209](https://github.com/apache/apisix/blob/master/apisix/plugin.lua#L209) and reload them on [line 221](https://github.com/apache/apisix/blob/master/apisix/plugin.lua#L221) I'm not sure if they are. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1467666286

   I agree with you that the `modification` is better, but why your file status changed? @boekkooi-lengoo 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1467230871

   @boekkooi-lengoo I'm afraid that your configuration is not correct.
   
   https://apisix.apache.org/docs/apisix/deployment-modes/#standalone
   ```
   apisix:
     enable_admin: false
     config_center: yaml
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] boekkooi-lengoo commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "boekkooi-lengoo (via GitHub)" <gi...@apache.org>.
boekkooi-lengoo commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1468203213

   @monkeyDluffy6017 if the data changes the `change`, `access` and `modification` change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] boekkooi-lengoo commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "boekkooi-lengoo (via GitHub)" <gi...@apache.org>.
boekkooi-lengoo commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1465911711

   @monkeyDluffy6017 I understand that, but the file has not changed. So why would it reload the files if nothing changed?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] boekkooi-lengoo commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "boekkooi-lengoo (via GitHub)" <gi...@apache.org>.
boekkooi-lengoo commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1467656048

   So I did some digging by adding the log `log.warn("change: ", json.encode(attributes))` on https://github.com/apache/apisix/blob/master/apisix/core/config_yaml.lua#L82.
   
   This results in the following information we reloads occur.
   **First reload shows.**
   ```JSON
   {
   "size": 18017,
   "dev": 2049,
   "ino": 5355318,
   "nlink": 1,
   "access": 1678782885,
   "gid": 1337,
   "rdev": 0,
   "permissions": "rw-r--r--",
   "modification": 1678726697,
   "blocks": 40,
   "blksize": 4096,
   "mode": "file",
   "uid": 0,
   "change": 1678782885
   }
   ```
   **Second reload shows.**
   ```JSON
   {
     "size": 18017,
     "dev": 2049,
     "ino": 5355318,
     "nlink": 1,
     "access": 1678782803,
     "gid": 1337,
     "rdev": 0,
     "permissions": "rw-r--r--",
     "modification": 1678726697,
     "blocks": 40,
     "blksize": 4096,
     "mode": "file",
     "uid": 0,
     "change": 1678782803
   }
   ```
   Now this shows that the `change` is updated. As [`lfs`](r http://lunarmodules.github.io/luafilesystem) uses [`stat`](https://linux.die.net/man/2/stat) which states the following it means that in my case we get false reloads which cause the log entries.
   > The field st_ctime is changed by writing or by setting inode information (i.e., owner, group, link count, mode, etc.).
   
   Based on the documentation of `lfs.attributes` under http://lunarmodules.github.io/luafilesystem/manual.html#reference which shows that `change` is the `time of last file status change` and `modification` is `time of last data modification` I think `modification` (mtime) should be used instead of `change` (ctime).
   
   What do you think @monkeyDluffy6017? Should I open a PR?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] boekkooi-lengoo commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "boekkooi-lengoo (via GitHub)" <gi...@apache.org>.
boekkooi-lengoo commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1468236114

   @monkeyDluffy6017 Please checkout https://github.com/apache/apisix/pull/9065 :smile: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1465789009

   APISIX needs to read yaml file and reload the plugin periodically when start with standalone mode


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] boekkooi-lengoo commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "boekkooi-lengoo (via GitHub)" <gi...@apache.org>.
boekkooi-lengoo commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1467551267

   @monkeyDluffy6017 Thanks for pointing the related config loading code out I'm going to have a in depth look as this only happens on our GKE cluster and not on my local kind cluster.
   
   I can also confirm that my `deployment` configuration is correctly set.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] boekkooi-lengoo commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "boekkooi-lengoo (via GitHub)" <gi...@apache.org>.
boekkooi-lengoo commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1467959421

   :+1: @monkeyDluffy6017 I don't know why the status changes it probably has to do with the way the [GKE](https://cloud.google.com/kubernetes-engine) is setup. I asked our system engineers to investigate, so if I hear more I will let you know.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1468209735

   PR is welcome


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] monkeyDluffy6017 commented on issue #9051: help request: Lots of `load(): new plugins` logs

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #9051:
URL: https://github.com/apache/apisix/issues/9051#issuecomment-1468194907

   Could you check if the data changes, does the `change` change?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org