Nginx reload process in detail

Francis Daly francis at
Fri Apr 28 11:52:09 UTC 2017

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

> 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"?


Francis Daly        francis at

More information about the nginx mailing list