Keepalived Connections Reset after reloading the configuration (HUP Signal)

tored nginx-forum at
Thu Oct 8 07:31:57 UTC 2020

Thanks Maxim to taking the time to respond.

> This feature wasn't removed in 5e6142609e48, but rather it was 
> changed how things work: instead of doing a full scan over all 
> connections on each event loop iteration, nginx now does it only 
> once, and also makes sure no new idle connections are added after 
> the shutdown signal.

I don't fully understand what happens to non-idle keep-alive connections
after the shutdown signal is sent.

If I understand correctly, non-idle keep-alive connections will continue to
serve requests after a graceful shutdown, until they are terminated by
"normal" events, such as:
* connection is closed/terminated by the client
* or by the server, e.g if (r->connection->requests >=
* or if keepalive_timeout is meet
* any other event that would close the connection during normal operation

>From reading the code, it looks like this is the expected flow after a
graceful shutdown. 

I read somewhere that they expected nginx to return "Connection: close"
headers to keepalive connections after graceful shutdown signal is sent. But
I don't see that is true, and not expected either from reading the code.


Posted at Nginx Forum:,197927,289684#msg-289684

More information about the nginx mailing list