how to do a graceful uwsgi reload via bash script?
You can restart uWSGI by sending the SIGHUP signal to your uWSGI process like so:
kill -HUP <process-id>
If you want to automate this in a bash script, you can have uWSGI write away it's process id by supplying the
pidfile option, for example like:
Then you can reload the process by:
uwsgi --reload /tmp/uwsgi.pid
You can also start uWSGI with the
touch-reload argument, which specifies a file that when touched makes uWSGI reload:
Then uWSGI will reload when you touch the file:
Remember that you can only reload uWSGI when it's running with the master process mode, but that's usually the case though.
More information: http://uwsgi-docs.readthedocs.io/en/latest/Management.html#reloading-the-server