Last Updated: August 01, 2023
· pilt

Run Django's runserver in supervisor

command=bin/python runserver

Without stopsignal=KILL and killasgroup=true (stopasgroup is available in 3.0a13) there will be an orphaned child process running after supervisorctl shutdown.

3 Responses
Add your response

Just an update here in case anyone stumbles upon this. If "killasgroup=true" doesn't work for you, try "stopasgroup=true". That's what I needed to get supervisor to properly stop the Django procs.


over 1 year ago ·

Another way is to run runserver --noreload

Notice --noreload parameter, which cause Django run on the main thread (but won't reload when a file changes).
For production environments, you should use something more robust. Gunicorn is a great server, and you can run easliy:
gunicorn wsgi:application --bind

over 1 year ago ·

stopasgroup=true works ok... thanks

over 1 year ago ·