Redémarrage gracieux du process master de gunicorn
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
`pc -C gunicorn` only lists the processes with `gunicorn` command, i.e., workers and master process. Workers are children of master as can be seen using `ps -C gunicorn fc -o ppid,pid,cmd`. We only need the pid of the master, therefore h flag is used to remove the first line which is PID text. Note that, f flag assures that master is printed above workers. The correct procedure is to send `HUP` signal only to the master. In this way `gunicorn` is gracefully restarted, only the workers, not master, are recreated.
This commit is contained in:
parent
157776b35d
commit
739c7e7dc0
|
@ -357,8 +357,9 @@ git checkout vX.Y.Z
|
|||
pip install -U requirements/prod.txt
|
||||
python manage.py migrate
|
||||
python manage.py collectstatic
|
||||
gunicorn reload -HUP
|
||||
kill -HUP `ps -C gunicorn fch -o pid | head -n 1` <1>
|
||||
----
|
||||
<1> https://stackoverflow.com/questions/26902930/how-do-i-restart-gunicorn-hup-i-dont-know-masterpid-or-location-of-pid-file
|
||||
|
||||
==== Configuration des sauvegardes
|
||||
|
||||
|
|
Loading…
Reference in New Issue