Did you try die-on-term option?

On Tue, Mar 18, 2014 at 6:18 PM,  <[email protected]> wrote:
> Thank you for your replies. To give a bit more information, this is my UWSGI
> log:
>
> *** WARNING: you are running uWSGI without its master process manager ***
> your processes number limit is 7890
> your memory page size is 4096 bytes
> detected max file descriptor number: 1024
> lock engine: pthread robust mutexes
> thunder lock: disabled (you can enable it with --thunder-lock)
> probably another instance of uWSGI is running on the same address
> (127.0.0.1:8001).
> bind(): Address already in use [core/socket.c line 759]
>
> It seems to be saying that for whatever reason supervisor can't close UWSGI
> socket. It seems that when I stop it the website goes down, but when I start
> it, I can't because it says it hasnt stopped. Very odd. I unfortunately use
> supervisor to manage celery too.
>
>
> -------- Original Message --------
> Subject: Re: [uWSGI] Problems managing uwsgi with supervisor
> From: "Roberto De Ioris" <[email protected]>
> Date: Mon, March 17, 2014 9:34 pm
> To: "uWSGI developers and users list" <[email protected]>
>
>
>> <html><body><span style="font-family:Verdana; color:#000000;
>> font-size:10pt;"><div>Hi,</div><div><br></div><div>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:</div><div><br></div><pre id="alt_console" style=""><div
>> style=""><span class="ansi0 bgAnsi15" style="">bind(): Address already in
>> use [core/socket.c line 759]</span>
>> </div><div style="">
>> </div><div
>> style=""><span class="ansi0 bgAnsi15" style="">2014-03-17 17:41:09,539
>> DEBG fd 11 closed, stopped monitoring &lt;POutputDispatcher at 42889016
>> for &lt;Subpro</span></div><div style=""><span class="ansi0 bgAnsi15"
>> style="">cess at 42340224 with name app in state STARTING&gt;
>> (stdout)&gt;</span> </div><div
>> style=""><span class="ansi0 bgAnsi15" style="">2014-03-17 17:41:09,539
>> DEBG fd 15 closed, stopped monitoring &lt;POutputDispatcher at 42906112
>> for &lt;Subpro</span></div><div style=""><span class="ansi0 bgAnsi15"
>> style="">cess at 42340224 with name app in state STARTING&gt;
>> (stderr)&gt;</span> </div><div
>> style=""><span class="ansi0 bgAnsi15" style="">2014-03-17 17:41:09,539
>> INFO exited: app (exit status 1; not expected)</span>
>
>> </div><div style=""><span class="ansi0 bgAnsi15"
>> style="">2014-03-17 17:41:09,539 DEBG received SIGCLD indicating a child
>> quit</span> </div><div style=""><span
>> class="ansi0 bgAnsi15" style="">2014-03-17 17:41:10,540 INFO gave up: app
>> entered FATAL state, too many start retries too quickly</span>
>> </div><div style=""><br></div><div style="">This is my
>> configuration:</div><div style=""><br></div><div style=""><pre style="">#
>> UWSGI
>> /usr/local/bin/pip install uwsgi
>
>> cat &lt;&lt; EOF &gt; /var/www/test/uwsgi_$APP.ini
>> [uwsgi]
>> socket = <span style="">127.0.0.1:8001</span>
>> 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 &lt;&lt; EOF &gt; /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 &lt;&lt; EOF &gt; /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</pre><pre style=""><br></pre><pre style="">I am so stuck with this,
>> can someone please help?</pre></div></pre></span></body></html>
>> _______________________________________________
>> uWSGI mailing list
>> [email protected]
>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>
>
> You should post uWSGI logs, they will report why the instance is not
> stopped.
>
> By the way if you are using supervisord only for uWSGI consider the
> Emperor instead as it is way easier
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>



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

Reply via email to