[uWSGI] How to gracefully restart uwsgi when running in daemon

Roberto De Ioris roberto at unbit.it
Tue Apr 7 10:55:58 CEST 2015

> Hi.
> I am running uwsgi in daemon mode,
> In my configure file, it configed with daemonize
> daemonize = /tmp/uwsgi_daemon.log
> Then, I run uwsgi with command line: uwsgi --ini /xxx/uwsgi.ini
> I found it will automatically running and I think it is in daemon status.
> Now, I want to reload uwsgi gracefully when I modify some code.
> uwsgi --reload ./uwsgi_master.pid
> But I found that master pid in uwsgi_master.pid is not updated, I
> think uwsgi is not restarted.
> I think this maybe uwsgi run in daemon and will not handle HUP signal.
> So when running in daemon, what is way to gracefully restart uwsgi.
> Best Regards
> --
> Rejoice,I Desire!

When reloaded uWSGI patches itself, it is normal it does not change its pid.

Always check the logs, to be sure the instance is reloaded (they are
pretty verbose).

You did not showed your full config, in some setup it could be needed to
use pidfile2 to postpone pidfile creation

Roberto De Ioris

More information about the uWSGI mailing list