So uwsgi is pretty crazy:
# ./bin/uwsgi --help|wc -l
857
I'm using it under runit to manage some graphite processes, the problem I was having, was that I simply couldn't get it to restart with sv t
, or stop with sv d
.
Turns out, this is because UWSGI's default behaviour is to "brutally reload" when it receives the TERM signal, unlike most other things you'd use under runit which would normally die.
Luckily, one of uwsgi's 857 options fixes this:
--die-on-term exit instead of brutal reload on SIGTERM
Pop that in your runit run script, and you'll be fine.
The full graphite run script I'm using is attached.