Reload signal for UWSGI when using Supervisord

supervisorduwsgi

I have been using UWSGI behind Nginx and I've set supervisord to restart the Nginx and UWSGI instances in case of a server reboot.

I am debugging my application and sometimes need to reload the application. According to this page I should be sending SIGHUP in order to do a graceful reload.

I could find a stopsignal config setting on this page, but I couldn't find any entry related to something like "reloadsignal" or "restartsignal".

Any ideas?

Best Answer

stopsignal

    The signal used to kill the program when a stop is requested. 
    This can be any of TERM, HUP, INT, QUIT, KILL, USR1, or USR2.

    Default: TERM

    Required: No.

    Introduced: 3.0

stopsignal=HUP is what you're looking for:

[program:uwsgi]
user = uwsgi
command=/usr/sbin/uwsgi ...
autostart=true
autorestart=true
stderr_logfile = /var/log/uwsgi/err.log
stdout_logfile = /var/log/uwsgi/out.log
stopsignal=HUP