I just ran tests on our Suse 11 staging server and can confirm that SIGTSTP
does a graceful stop (with threads and 4 workers).  However, SIGINT and
SIGQUIT have the same behavior on linux as they do on OsX and are not
graceful, but do an immediate worker kill.  My new workaround is to issue a
SIGTSTP and wait for all to report completion then issue SIGQUIT to the
master, but I set no-orphans in our ini so all workers would also die.  I
would be uncomfortable with that setting if this wasn't only needed on our
zerg processes when we are doing a graceful patch when we will be
monitoring anyway.

For those who are interested in a similar graceful patch restart with nginx
+ uWSGI, I have confirmed that SIGHUP to nginx does a graceful reload on
both linux & OsX 10.7+.

--michael

On Sun, Apr 28, 2013 at 8:29 AM, Michael Hunley <[email protected]>wrote:

> > Every platform has different limits and behaviour (for example forget
> > about gracefulness in osx + threads)
>
> That would explain it as this is on OsX with threads for dev.  Real env is
> linux+threads.  Will it work reliably on that env?
>
> I have tested SIGTSTP and it works to gracefully suspend all workers on
> OsX.  Out of curiosity, why would that work and SIGHUP/SIGINT not work?
>  the touch reload/restart also works.  My workaround for now is to issue
> SIGTSTP and wait for all workers to suspend then issue SIGINT, but I have
> to do that to master + all workers, which is somewhat inconvenient, so if I
> could skip that when I need to shut down my zergs it would be good.
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to