Crazyshezy
Crazyshezy

Reputation: 1620

supervisor restart causes zombie uwsgi process

I have a python/Django project (myproject) running on nginx and uwsgi.

I am running uwsgi command via supervisord. This works perfectly, but on restarting supervisord it creates zombie process. what am i doing wrong? What am I overlooking to do this cleanly? any Advise?

Often times supervisor service takes too long. at that point I have found the following in supervisor.log file

INFO waiting for stage2_BB_wsgi, stage3_BB_wsgi, stage4_BB_wsgi to die

Point to Note: I am running multiple staging server in one machine, namely stage2 .. stageN

supervisor.conf file extract [program:stage2_BB_wsgi] command=uwsgi --close-on-exec -s /home/black/stage2/shared_locks/uwsgi_bb.sock --touch-reload=/home/black/stage2/shared_locks/reload_uwsgi --listen 10 --chdir /home/black/stage2/myproject/app/ --pp .. -w app.wsgi -C666 -H /home/black/stage2/myproject/venv/ user=black numprocs=1 stdout_logfile=/home/black/stage2/logs/%(program_name)s.log stderr_logfile=/home/black/stage2/logs/%(program_name)s.log autostart=true autorestart=true startsecs=10 exitcodes=1 stopwaitsecs=600 killasgroup=true priority=1000

thanks in advance.

Upvotes: 2

Views: 1727

Answers (1)

Conrad
Conrad

Reputation: 96

You will want to set your stopsignal to INT or QUIT.

By default supervisord sends out a SIGTERM when restarting a program. This will not kill uwsgi, only reload it and its workers.

Upvotes: 3

Related Questions