Welcome! Log In Create A New Profile

Advanced

New HTTP requests handled by old worker process in nginx reload

April 10, 2024 03:21AM
Hey Nginx experts,

During nginx reload, while old and new worker processes are co-existing, new incoming HTTP request from the same client continues to be handled by the old worker process.

For example I only have 1 worker process configured:
2024-04-09 23:58:28.977492708
nobody 344 3.1 0.1 16228 9796 ? S 23:58 0:00 nginx: worker process
nobody 1912 0.0 0.1 16508 9900 ? R 23:58 0:00 nginx: worker process
admin 1917 0.0 0.0 3680 1996 pts/6 S+ 23:58 0:00 grep --color=auto nginx
root 27857 0.0 0.0 12252 7412 ? Ss 23:07 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf -g pid /run/nginx.pid;

pid 344 is the old worker process and 1912 is for the newly created one.

And in log nginx-error.log:
2024/04/09 23:58:28 [debug] 1912#0: epoll add event: fd:7 op:1 ev:00002001
2024/04/09 23:58:28 [debug] 1912#0: epoll add event: fd:8 op:1 ev:00002001
2024/04/09 23:58:28 [debug] 1912#0: epoll add event: fd:9 op:1 ev:00002001
2024/04/09 23:58:28 [debug] 344#0: *3375 ssl new session: D7E3C47D:32:149
2024/04/09 23:58:28 [debug] 344#0: *3375 ssl new session: 1A1D45B1:32:149

New worker process 1912 has been created while the old process continues to handle new TLS session from client.

Is this the expected behavior? How can I make sure the nginx service has been completely reloaded with new config?

Thanks for your help!
Ziqian
Subject Author Posted

New HTTP requests handled by old worker process in nginx reload

ZiqianXu April 10, 2024 03:21AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 216
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready