rfk/django-supervisor — Issue #15: webserver entered FATAL state.
Author: dlutcat
Created: 2012-03-08 04:30:02+00:00
State: open

When I use `sudo python manage.py supervisor`, the log is telling me that **webserver exited**.

### Supervisor start log:

> 2012-03-08 12:06:34,223 CRIT Set uid to user 0
> 2012-03-08 12:06:34,265 INFO RPC interface 'supervisor' initialized
> 2012-03-08 12:06:34,266 INFO supervisord started with pid 19530
> 2012-03-08 12:06:35,270 INFO spawned: 'webserver' with pid 19539
> 2012-03-08 12:06:36,177 DEBG fd 7 closed, stopped monitoring (stdout)>
> 2012-03-08 12:06:36,177 INFO exited: webserver (exit status 0; not expected)
> 2012-03-08 12:06:36,177 DEBG received SIGCLD indicating a child quit
> 2012-03-08 12:06:37,182 INFO spawned: 'webserver' with pid 19553
> 2012-03-08 12:06:38,074 DEBG fd 7 closed, stopped monitoring (stdout)>
> 2012-03-08 12:06:38,074 INFO exited: webserver (exit status 0; not expected)
> 2012-03-08 12:06:38,074 DEBG received SIGCLD indicating a child quit
> 2012-03-08 12:06:40,080 INFO spawned: 'webserver' with pid 19563
> 2012-03-08 12:06:40,987 DEBG fd 7 closed, stopped monitoring (stdout)>
> 2012-03-08 12:06:40,987 INFO exited: webserver (exit status 0; not expected)
> 2012-03-08 12:06:40,987 DEBG received SIGCLD indicating a child quit
> 2012-03-08 12:06:43,994 INFO spawned: 'webserver' with pid 19572
> 2012-03-08 12:06:44,900 DEBG fd 7 closed, stopped monitoring (stdout)>
> 2012-03-08 12:06:44,901 INFO exited: webserver (exit status 0; not expected)
> 2012-03-08 12:06:44,901 DEBG received SIGCLD indicating a child quit
> 2012-03-08 12:06:45,902 INFO gave up: webserver entered FATAL state, too many start retries too quickly

In fact, the webserver process starts successfully and `ps -ef | grep fcgi` can find it. However using `sudo python mange.py supervisor shell`, displays:

> webserver FATAL Exited too quickly (process log may have details)

So, may anybody help me ? Here is my supervisord.conf:

### Supervisord.conf

> {% if not settings.DBUG %}
> [program:runserver]
> exclude=true
>
> [program:webserver]
> command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py runfcgi host=127.0.0.1 port=8000
> {% endif %}
>
> [program:celerybeat]
> autoreload = true
> numprocs = 1
> redirect_stderr = true
> startsecs = 5
> priority = 999
> command = {{ PYTHON }} {{ PROJECT_DIR }}/manage.py celerybeat --pidfile=/var/run/celerybeat.pid --logfile=/var/log/celerybeat.log
> user = root
> directory = {{ PROJECT_DIR }}
> exclude=true
>
> [program:celeryd]
> autoreload = true
> numprocs = 1
> redirect_stderr = true
> stopwaitsecs = 600
> startsecs = 5
> priority = 998
> command = {{ PYTHON }} {{ PROJECT_DIR }}/manage.py celeryd --pidfile=/var/run/celeryd.pid --logfile=/var/log/celeryd.log
> user = root
> directory = {{ PROJECT_DIR }}
> exclude=true
>
> [supervisord]
> logfile=/var/log/supervisor/supervisord.log
> logfile_maxbytes=50MB
> logfile_backups=10
> loglevel=debug ; info, debug, warn, trace
> pidfile=/var/run/supervisord.pid
> nodaemon=true
> minfds=1024
> minprocs=200
> user=root
>
> [program:__overrides__]
> user=root