OK. uwsgi can't inherit socket since it compared "0.0.0.0:3008" with ":3008".
I've created pull-request to fix the problem. https://github.com/unbit/uwsgi/pull/1115 On Fri, Nov 20, 2015 at 1:11 PM, 陈泽佳 <[email protected]> wrote: > Hi, dear friends from uwsgi: > > I found that what matters is the configuration of the 'http_socket': > > Below is the uwsgi configuration before: > > uwsgi: > master: 1 > vacuum: 1 > virtualenv: /home/projects/uwsgi_app/virtualenv > procname-prefix: uwsgi_app_ > processes: 6 > chdir: /home/projects/uwsgi_app > wsgi: tinyapp.app > need-app: 1 > disable-logging: true > logto2: /home/projects/uwsgi_app/var/log/uwsgi_app.log > http-socket: 0.0.0.0:3008 > stats: 127.0.0.1:4008 > max-fd: 65535 > reload-on-rss: 256 > log-reopen: true > log-slow: 1000 > buffer-size: 32768 > umask: 027 > max-requests: 50000 > worker-reload-mercy: 10 > listen: 1024 > harakiri: 20 > > and here is the nginx configuration: > upstream tiny_app { > server localhost:3008; > } > > server { > listen 80; > > server_name tinyapp.com; > > location / { > proxy_pass http://tiny_app; > } > } > > And then I got nginx connection reset when reloading uwsgi. > > If the change the 'http-socket: 0.0.0.0:3008' in the uwsgi's > configuration into: > > http-socket: 127.0.0.1:3008 > > or > > shared-socket: 0.0.0.0:3008 > http-socket: =0 > > Everything goes well. I got no nginx connection reset errors when > reloading uwsgi. > > > 2015-11-19 18:56 GMT+08:00 陈泽佳 <[email protected]>: > >> I've update the* version* to the *latest* one in the github projects >> provided. >> https://github.com/zejiachen/uwsgi_problem. >> >> In the newest project provided, I load only the RequestHandler, >> WSGIApplication needed, instead of the whole webapp2 framework. >> >> >* Have you tried removing lazy-apps?* >> >> Actually, I have tried removing lazy-apps. >> However, it make no difference, and the problem still exists. >> >> Thanks a lot! >> >> >> 2015-11-19 16:38 GMT+08:00 Riccardo Magliocchetti < >> [email protected]>: >> >>> Hi, >>> >>> Il 19/11/2015 03:16, 陈泽佳 ha scritto: >>> >>>> Hi, dear Riccardo, >>>> >>>> ///Have you tried -HUP with latest stable version?/ >>>>> >>>> >>>> Yes, I used version 1.9.21.1 before. But after I switch to the latest >>>> version >>>> 2.0.11.2, the problem still exists. According to the following docs, a >>>> version >>>> higher than 1.4 would be ok. >>>> >>>> >>>> http://uwsgi-docs.readthedocs.org/en/latest/articles/TheArtOfGracefulReloading.html#the-art-of-graceful-reloading >>>> >>> >>> Always report bugs after testing the latest version as they may be >>> already fixed. >>> >>> >>>> ///Another thing may be that your app takes a bit to come up/ >>>>> >>>> >>>> Even in a tiny app (respond 'hello world'), the problem still exists. >>>> >>> >>> It's tiny but you are loading a full framework :), a tiny app would have >>> been a tiny wsgi application like a single function as in >>> http://wsgi.tutorial.codepoint.net/environment-dictionary >>> >>> Have you tried removing lazy-apps? >>> >>> >>> -- >>> Riccardo Magliocchetti >>> @rmistaken >>> >>> http://menodizero.it >>> >> >> >> >> -- >> Best Regards >> >> Chen Zejia (陈泽佳) >> Tsinghua National Lab for Information Science and Technology >> Dept. of Computer Science and Technology >> Tsinghua University, Beijing, P.R. China, 100084 >> Email:[email protected] <[email protected]> >> >> > > > -- > Best Regards > > Chen Zejia (陈泽佳) > Tsinghua National Lab for Information Science and Technology > Dept. of Computer Science and Technology > Tsinghua University, Beijing, P.R. China, 100084 > Email:[email protected] <[email protected]> > > > _______________________________________________ > 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
