I've just installed uwsgi by pip install uwsgi in a virtual env. In "ini" file I used:

socket =
# no pidfile option

And run uwsgi --ini config.ini

But how to stop this instance of uwsgi?
uwsgi --stop ... wants a pid file. I can't use an address:

open(""): No such file or directory [core/io.c line 505]

And if killing - uwsgi just respawns itself.

ps ax | grep uwsgi
15005 pts/4    S      0:00 /ve/path/bin/uwsgi --ini config.ini
15006 pts/4    S      0:00 /ve/path/bin/uwsgi --ini config.ini
15007 pts/4    S      0:00 /ve/path/bin/uwsgi --ini config.ini

killall -s INT /ve/path/bin/uwsgi
  • 6
    If you don't have killall, you can also do sudo pkill -f uwsgi -9 – Zachary Blackwood May 27 '16 at 19:38

It is a known feature that you cannot terminate uwsgi with just kill. The second bullet of: http://uwsgi-docs.readthedocs.org/en/latest/ThingsToKnow.html

Til uWSGI 2.1, by default, sending the SIGTERM signal to uWSGI means “brutally reload the stack” while the convention is to shut an application down on SIGTERM. To shutdown uWSGI use SIGINT or SIGQUIT instead. If you absolutely can not live with uWSGI being so disrespectful towards SIGTERM, by all means enable the die-on-term option. Fortunately, this bad choice has been fixed in uWSGI 2.1


Similar to the top one answer, in Ubuntu or Debian you can simply dosudo killall -9 uwsgi. Though I do want to know if uwsgi gives a way to stop itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.