I think you should know die-on-term option.

2014年3月18日火曜日、<[email protected]>さんは書きました:

> Hi,
>
> It seems a lot of people maange uwsgi with supervisor but I haven't had
> any luck. Supervisor starts UWSGI just fund but when I do a restart or a
> stop/start I get this error in my logs:
>
> bind(): Address already in use [core/socket.c line 759]
>                                                                               
>                           2014-03-17 17:41:09,539 DEBG fd 11 closed, stopped 
> monitoring <POutputDispatcher at 42889016 for <Subpro
> cess at 42340224 with name app in state STARTING> (stdout)>
> 2014-03-17 17:41:09,539 DEBG fd 15 closed, stopped monitoring 
> <POutputDispatcher at 42906112 for <Subpro
> cess at 42340224 with name app in state STARTING> (stderr)>
> 2014-03-17 17:41:09,539 INFO exited: app (exit status 1; not expected)
> 2014-03-17 17:41:09,539 DEBG received SIGCLD indicating a child quit
> 2014-03-17 17:41:10,540 INFO gave up: app entered FATAL state, too many start 
> retries too quickly
>
> This is my configuration:
>
> # UWSGI
> /usr/local/bin/pip install uwsgi
> cat << EOF > /var/www/test/uwsgi_$APP.ini
> [uwsgi]
> socket = 127.0.0.1:8001
> processes = 4
> chdir = /var/www/test
> virtualenv = /var/www/test/venv
> pythonpath = /var/www/test/venv/bin/python
> module = run
> callable = app
> EOF
>
> # Supervisor
> /usr/local/bin/pip install supervisor --pre
> cat << EOF > /etc/supervisord.conf
> [unix_http_server]
> file=/var/run/supervisor.sock
> [supervisord]
> logfile=/var/log/supervisord.log
> pidfile=/var/run/supervisord.pid
> loglevel=debug
> [rpcinterface:supervisor]
> supervisor.rpcinterface_factory = 
> supervisor.rpcinterface:make_main_rpcinterface
> [supervisorctl]
> serverurl=unix:///var/run/supervisor.sock
> [include]
> files = /var/www/test/supervisor*.ini
> EOF
>
> cat << EOF > /var/www/test/supervisor_app.ini
> [program:test]
> command=/usr/local/bin/uwsgi --ini /var/www/test/uwsgi_test.ini
> user=uwsgi
> autostart=true
> autorestart=true
> stderr_logfile=uwsgi_err.log
> stdout_logfile=uwsgi_out.log
> stopsignal=INT
> EOF
>
>
> I am so stuck with this, can someone please help?
>
>

-- 
INADA Naoki  <[email protected]>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to