Welcome! Log In Create A New Profile

Advanced

Re: Nginx reload process in detail

Francis Daly
April 28, 2017 07:54AM
On Thu, Apr 27, 2017 at 05:21:06AM -0400, shivramg94 wrote:

Hi there,

The rough description of the reload process is available by searching
for "nginx control" or "nginx reload"; the exact details are available
in the source.

> In the Nginx documentation, it was mentioned that the older worker process
> would continue to run untile they have served the accepted inflight requests
> and then would go down. But the actual behavior seems to be different as the
> persistent connections are being dropped as soon as a configuration reload
> was issued.

You have used the words "process", "requests", and "connections"
above. You should be aware that they refer to different things.

The intention of a "graceful" shutdown of worker processes is that
current idle connections will be closed, while current active requests
will complete and then their connections will be closed.

That seems to match what you are reporting, but perhaps I am missing
something.

> To add to the above question, while reload was in progress, i am trying to
> establish a new connection and its not being established. Can't the new
> worker processes which were spawned as a result of configuration reload,
> straight away serve the incoming new connections?

I believe that nginx should allow new connections to be established
and be handled by the new workers during an "nginx -s reload" invocation,
or when the master process receives a HUP signal.

Can you show a test case where that does not happen?

What nginx version do you use? How do you invoke the reload? Can you
show the new connection failing to be established, perhaps in "tcpdump"?

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx reload process in detail

shivramg94 April 27, 2017 05:21AM

Re: Nginx reload process in detail

alexsamad April 27, 2017 07:08AM

Re: Nginx reload process in detail

Francis Daly April 28, 2017 07:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
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