django - Gunicorn sync workers spawning processes -


we're using django + gunicorn + nginx in our server. problem after while see lot's of gunicorn worker processes have became orphan, , lot other ones have became zombie. can see of gunicorn worker processes spawn other gunicorn workers. our best guess these workers become orphans after parent workers have died.
why gunicorn workers spawn child workers? why die?! , how can prevent this?
should mention we've set gunicorn log level debug , still don't see thing significant, other periodical log of workers number, reports count of workers wanted it.

update line used run gunicorn:

gunicorn --env django_settings_module=proj.settings proj.wsgi --name proj --workers 10 --user proj --group proj --bind 127.0.0.1:7003 --log-level=debug --pid gunicorn.pid --timeout 600 --access-logfile /home/proj/access.log --error-logfile /home/proj/error.log

in case deploy in ubuntu servers (lts releases, 14.04 lts servers) , never did have problems gunicorn daemons, create gunicorn.conf.py , launch gunicorn config upstart script in /etc/init/djangoapp.conf

description "djangoapp website" start on startup stop on shutdown respawn respawn limit 10 5  script   cd /home/web/djangoapp   exec /home/web/djangoapp/bin/gunicorn -c gunicorn.conf.py -u web -g web djangoapp.wsgi end script 

i configure gunicorn .py file config , setup options (details below) , deploy app (with virtualenv) in /home/web/djangoapp , no problems zombie , orphans gunicorn processes.

i verified options, timeout can problem 1 don't setup max-requests in config, default 0, so, no automatic worker restart in daemon , can generate memory leaks (http://gunicorn-docs.readthedocs.org/en/latest/settings.html#max-requests)


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -