Hi, all,

I'm using uwsgi as my python web app server, and nginx as a proxy.
According to the uwsgi documents, the reload should be graceful. However,
when I reload the uwsgi, some nginx errors (connection reset by peer)
occur.

I have put a* tiny app in the github for presenting the problem*. The
project is in *https://github.com/zejiachen/uwsgi_problem
<https://github.com/zejiachen/uwsgi_problem>*.

Here is the *uwsgi config*:

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
  lazy-apps: 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

When I run  *http_load* -p 5 -r 5 -f 25 url.txt, and *kill -HUP
pid_of_master*, *errors *occur:

http://tinyapp.com: byte count wrong
http://tinyapp.com: byte count wrong
http://tinyapp.com: byte count wrong
http://tinyapp.com: byte count wrong
http://tinyapp.com: byte count wrong
25 fetches, 5 max parallel, 1050 bytes, in 5.00763 seconds
42 mean bytes/connection
4.99238 fetches/sec, 209.68 bytes/sec
msecs/connect: 1.5476 mean, 2.336 max, 1.011 min
msecs/first-response: 99.7971 mean, 835.358 max, 1.607 min
5 bad byte counts
HTTP response codes:
  code 200 -- 20
  code 502 -- 5


Here is the *nginx error log*:

2015/11/16 09:35:32 [error] 12232#0: *3687 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
127.0.0.1, server: tinyapp.com, request: "GET / HTTP/1.0", upstream: "
http://127.0.0.1:3008/";, host: "tinyapp.com"
2015/11/16 09:35:32 [error] 12232#0: *3689 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
127.0.0.1, server: tinyapp.com, request: "GET / HTTP/1.0", upstream: "
http://127.0.0.1:3008/";, host: "tinyapp.com"
2015/11/16 09:35:32 [error] 12232#0: *3691 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
127.0.0.1, server: tinyapp.com, request: "GET / HTTP/1.0", upstream: "
http://127.0.0.1:3008/";, host: "tinyapp.com"
2015/11/16 09:35:32 [error] 12232#0: *3693 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
127.0.0.1, server: tinyapp.com, request: "GET / HTTP/1.0", upstream: "
http://127.0.0.1:3008/";, host: "tinyapp.com"
2015/11/16 09:35:32 [error] 12232#0: *3695 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
127.0.0.1, server: tinyapp.com, request: "GET / HTTP/1.0", upstream: "
http://127.0.0.1:3008/";, host: "tinyapp.com"

I use uwsgi 1.9.21.1. The problem also occurs when I use the latest version
of uwsgi.

Could anyone help me? Thanks a lot!

-- 
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

Reply via email to