Hi, Roberto Thank you for your response. I have try using http-socket and uwsgi-socket. But it doesn't help. There is still many connection reset error.
Here is my config now: uwsgi: master: 1 procname-prefix: mkey processes: 64 uid: mkey gid: mkey chdir: /home/projects/mkey/src python-path: /home/projects/mkey/src wsgi: wsgi_handler need-app: 1 pidfile: /home/projects/mkey/var/run/ mkey.pid daemonize: /home/projects/mkey/var/logs/uwsgi.log disable-logging: true http-socket: 0.0.0.0:4004 stats: 127.0.0.1:4000 max-fd: 65535 idle: 30 reload-on-rss: 256 touch-logreopen: /home/projects/mkey/var/run/touch-logreopen touch-logrotate: /home/projects/mkey/var/run/touch-logrotate log-reopen: true log-slow: 1000 buffer-size: 32768 reload-mercy: 60 On Fri, Dec 6, 2013 at 2:17 PM, Roberto De Ioris <[email protected]> wrote: > >> 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 _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
