You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As APISIX executes reload, but the old process does not exit for a long time.
root 885278 1 0 Jul05 ? 00:00:00 nginx: master process /usr/bin/openresty -p /usr/local/apisix -c /usr/local/apisix/conf/nginx.conf
nobody 885280 885278 0 Jul05 ? 00:09:03 nginx: worker process is shutting down
nobody 885281 885278 0 Jul05 ? 00:08:39 nginx: worker process is shutting down
nobody 885282 885278 0 Jul05 ? 00:08:24 nginx: worker process is shutting down
nobody 1288295 885278 0 18:09 ? 00:00:03 nginx: worker process is shutting down
nobody 1288517 885278 5 18:10 ? 00:03:10 nginx: worker process
nobody 1288518 885278 4 18:10 ? 00:02:16 nginx: worker process
nobody 1288519 885278 4 18:10 ? 00:02:15 nginx: worker process
nobody 1288520 885278 4 18:10 ? 00:02:12 nginx: worker process
nobody 1288521 885278 0 18:10 ? 00:00:01 nginx: cache manager process
root 1288522 885278 3 18:10 ? 00:01:41 nginx: privileged agent process
root 1296427 1280594 0 19:04 pts/0 00:00:00 grep --color=auto nginx
From above, it can be seen that the creation time of the new process is 18:10, but it is already 19:05 now
[root@knode10-72-73-177 logs]# date
Fri Jul 7 19:05:05 CST 2023
The value of the configuration item "worker_shutdown_timeout" in the APISIX configuration file is set to 240 seconds.
nginx_config: # config for render the template to generate nginx.conf
#user: root # specifies the execution user of the worker process.
# the "user" directive makes sense only if the master process runs with super-user privileges.
# if you're not root user,the default is current user.
error_log: /DATA1/apisix/apisix/logs/error.log
error_log_level: warn # warn,error
worker_processes: 4 # if you want use multiple cores in container, you can inject the number of cpu as environment variable "APISIX_WORKER_PROCESSES"
enable_cpu_affinity: false # disable CPU affinity by default, if APISIX is deployed on a physical machine, it can be enabled and work well.
worker_rlimit_nofile: 6553500 # the number of files a worker process can open, should be larger than worker_connections
worker_shutdown_timeout: 240s # timeout for a graceful shutdown of worker processes
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
systemctl reload apisix
Environment
APISIX version (run apisix version): 3.4.0
Operating system (run uname -a): Linux knode10-72-73-177 5.15.29-200.el7.x86_64 #1 SMP Thu Mar 31 14:09:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
OpenResty / Nginx version (run openresty -V or nginx -V):
I reproduced this bug. It seems cause by that the worker process not close connection with etcd in woker exit phase. Let me investigate how to fix it, it seems a bit complicated to me.
Current Behavior
As APISIX executes reload, but the old process does not exit for a long time.
From above, it can be seen that the creation time of the new process is 18:10, but it is already 19:05 now
The value of the configuration item "worker_shutdown_timeout" in the APISIX configuration file is set to 240 seconds.
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
Environment
apisix version
):3.4.0
uname -a
):Linux knode10-72-73-177 5.15.29-200.el7.x86_64 #1 SMP Thu Mar 31 14:09:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):3.5.9
3.0.1
luarocks --version
):The text was updated successfully, but these errors were encountered: