Keepalived Connections Reset after reloading the configuration (HUP Signal)
Maxim Dounin
mdounin at mdounin.ru
Wed Oct 7 13:54:28 UTC 2020
Hello!
On Wed, Oct 07, 2020 at 04:29:50AM -0400, tored wrote:
> I'm looking into the same issue; how to improve graceful shutdown when using
> keep-alive connections.
>
> It seems nginx at some point had support for doing graceful shutdown (if i
> read the code correctly):
> http://hg.nginx.org/nginx/rev/03f1133f24e8
>
> But it was removed at a later stage:
> http://hg.nginx.org/nginx/rev/5e6142609e48
You aren't reading the code correctly.
Starting with nginx 0.5.15 (revision 03f1133f24e8), nginx closes
keepalive connnections when it receives the reconfiguration
signal. Quoting CHANGES:
*) Feature: now the keep-alive connections are closed just after
receiving the reconfiguration signal.
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.
[...]
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx
mailing list