You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/06 09:43:53 UTC

[GitHub] [apisix] sixinyiyu opened a new issue #2359: work process 都会执行脚本中的ngx_timer_every 调度吗

sixinyiyu opened a new issue #2359:
URL: https://github.com/apache/apisix/issues/2359


   ### Issue description
   discovery 里的nacos.lua会在启动时拉取一下服务列表,我这里打印了下日志
   ![QQ图片20201006174034](https://user-images.githubusercontent.com/3435446/95185355-30b0a200-07fb-11eb-9a4f-f9cbca0e129d.png)
   同时也显示 4个nginx工作线程,那这样的话,每次去更新服务列表跟服务实例的时候,会n个工作线程同时执行这个任务?
   如何规避,让其中一个线程去执行就可以了?
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.5
   * OS: centos
   


----------------------------------------------------------------
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.

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



[GitHub] [apisix] membphis commented on issue #2359: work process 都会执行脚本中的ngx_timer_every 调度吗

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2359:
URL: https://github.com/apache/apisix/issues/2359#issuecomment-704278236


   > 如何规避,让其中一个线程去执行就可以了
   
   welcome PR for a better way ^_^
   
   @sixinyiyu if possible, please use English in a public channel. 
   
   We hope that more and more people from all over the world will join us for a better API gateway.


----------------------------------------------------------------
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.

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



[GitHub] [apisix] sixinyiyu closed issue #2359: work process 都会执行脚本中的ngx_timer_every 调度吗

Posted by GitBox <gi...@apache.org>.
sixinyiyu closed issue #2359:
URL: https://github.com/apache/apisix/issues/2359


   


----------------------------------------------------------------
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.

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



[GitHub] [apisix] sixinyiyu removed a comment on issue #2359: work process 都会执行脚本中的ngx_timer_every 调度吗

Posted by GitBox <gi...@apache.org>.
sixinyiyu removed a comment on issue #2359:
URL: https://github.com/apache/apisix/issues/2359#issuecomment-704159309


   知道原因了,操作的是自己工作线程里的变量,如果将applications 申明成 lua_shared_dict  所有线程可见呢;然后保证一个线程去更新


----------------------------------------------------------------
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.

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



[GitHub] [apisix] sixinyiyu commented on issue #2359: work process 都会执行脚本中的ngx_timer_every 调度吗

Posted by GitBox <gi...@apache.org>.
sixinyiyu commented on issue #2359:
URL: https://github.com/apache/apisix/issues/2359#issuecomment-704186339


   变量可见性


----------------------------------------------------------------
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.

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



[GitHub] [apisix] sixinyiyu edited a comment on issue #2359: work process 都会执行脚本中的ngx_timer_every 调度吗

Posted by GitBox <gi...@apache.org>.
sixinyiyu edited a comment on issue #2359:
URL: https://github.com/apache/apisix/issues/2359#issuecomment-704159309


   知道原因了,操作的是自己工作线程里的变量,如果将applications 申明成 lua_shared_dict  所有线程可见呢;然后保证一个线程去更新


----------------------------------------------------------------
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.

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