Welcome! Log In Create A New Profile

Advanced

Re: stop timers and close connections on Nginx reload

Maxim Dounin
August 19, 2013 07:16AM
Hello!

On Sat, Aug 17, 2013 at 02:26:14PM -0300, Wandenberg Peixoto wrote:

> is there a way to, inside a module, be notified when the Nginx process
> received a signal to reload?
> I need to stop some timers and do cleanup routines when a worker is on
> "worker process is shutting down" state to allow it to completely stop as
> fast as possible.
>
> I don't want to start a periodic timer to check this, if there is another
> way.

If connection's c->idle flag is set, it's read event handler will be
called on shutdown with c->close set to 1. This might not be very
convenient if your timers aren't connection-related though.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

stop timers and close connections on Nginx reload

wandenberg 1040 August 17, 2013 01:28PM

Re: stop timers and close connections on Nginx reload

Maxim Dounin 554 August 19, 2013 07:16AM



Sorry, you do not have permission to post/reply in this forum.

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