[Django]-Django/gunicorn app restart

3👍

To only grab your project’s gunicorn and restart it, you can use the following:

ps aux |grep gunicorn |grep yourappname | awk '{ print $2 }' |xargs kill -HUP

Other gunicorn processes will not be affected.

👤aris

1👍

Gunicorn + Supervisor is pretty standard stack, you could have your sites separated as different Supervisor tasks and instead of telling Jenkins to restart Supervisor, use the Supervisor method for restarting just one of your tasks, and you’re done.

Supervisor is also great if your site crashes and Gunicorn needs to be executed again.

Leave a comment