Django 프로젝트를 운영하다 보면 Gunicorn 프로세스를 완전히 종료한 뒤 다시 시작해야 할 때가 있습니다. 단순히 restart만으로는 남아 있는 프로세스가 영향을 줄 수 있기 때문에, 안전하게 kill → reload → restart 순서를 지켜주는 것이 좋습니다.
아래 명령어를 순서대로 실행하면 됩니다.
pkill -9 -f gunicorn
sudo systemctl daemon-reload
sudo systemctl restart gunicorn
sudo systemctl start gunicorn
sudo systemctl enable gunicorn
@nullvuild