> Hi, all.
> I was using uwsgi as my python web app server, with a nginx proxy.
> According to the uwsgi document, the reload should be graceful.
> However, when I reload the uwsgi server, there will be some connection
> reset and connection refuse error in the nginx error log. As
> following:
>
> 2013/12/05 16:39:12 [error] 17825#0: *57240420 recv() failed (104:
> Connection reset by peer) while reading response header from upstream,
> client: 182.127.224.4, server: testhosting.com, request: "POST
> /WSszq1twyG/api/v3/get_my_info HTTP/1.1", upstream:
> "http://127.0.0.1:4004/api/v3/get_my_info";, host: "testhosting.com"
> 2013/12/05 16:39:12 [error] 17826#0: *57240443 connect() failed (111:
> Connection refused) while connecting to upstream, client:
> 119.103.17.63, server: testhosting.com, request: "POST
> /WSszq1twyG/api/v3/confirm_qr_
> code_login HTTP/1.1", upstream:
> "http://127.0.0.1:4004/api/v3/confirm_qr_code_login";, host:
> "testhosting.com"
>
> I was reloading the uwsgi server by executing "uwsgi --reload <pid>".
>
> Here is my uwsgi config:
> uwsgi:
>   master: 1
>   procname-prefix: test
>   processes: 64
>   uid: web
>   gid: web
>   chdir: /home/projects/test/src
>   python-path: /home/projects/test/src
>   wsgi: wsgi_handler
>   need-app: 1
>   pidfile: /home/projects/test/var/run/
> test.pid
>   daemonize: /home/projects/test/var/logs/uwsgi.log
>   disable-logging: true
>   http: 0.0.0.0:4004

http-socket NOT http, with http you spawn an additional http proxy, so the
pipeline will be

nginx -> uwsgi-http -> uwsgi

while you want

nginx -> uwsgi

in addition to this there is no graceful reload for uwsgi httprouter

if your nginx is recent you may want to try uwsgi protocol instead of http
one (but http-socket will solve your issue and it is good enough)

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to