Doh, followed the hello world tutorial a bit too close. Updated version with --http-socket, and updated the test case to trigger the "[Errno 104] Connection reset by peer" issue. It's still on https://gist.github.com/chkwok/5890500, use revision #2.
The test case is reordered, to do: 1. GET / 2. During #1, touch app.wsgi 3. GET / And it's the second request that gets a connection reset by peer, the first one completes normally. This test case does not break: 1. Touch app.wsgi 2. GET / The get completes normally. Kind regards, Chi Ho Kwok On 29 June 2013 14:03, Roberto De Ioris <[email protected]> wrote: > > > Hi there, > > > > I've created a minimal test case for the graceful reload issue we're > > encountering on Ubuntu 10.04 at https://gist.github.com/chkwok/5890500. > It > > consists of three files: > > > > > > 1. app.wsgi file that's basically Hello World, except that it waits > for > > 5 seconds before responding > > 2. run-server.sh that contains a single line, uwsgi --http :9090 > > --wsgi-file app.wsgi --touch-reload app.wsgi > > 3. test.py that contains the test case - fetch 127.0.0.1:9090, then > > fetch again but touch the app.wsgi file after one second to simulate a > > graceful reload during a request. > > > > > > Also in the gist: two files containing the output of test.py and uwsgi > > > > > > Versions: uwsgi 1.9.13, Ubuntu 10.04 with all patches applied. More > > details > > are in the uwsgi log. > > > > > > These lines caught my eye: > > > > Sat Jun 29 11:20:40 2013 - *** app.wsgi has been touched... grace them > > all !!! *** > > gateway "uWSGI http 1" has been buried (pid: 5756) > > > > ...gracefully killing workers... > > Gracefully killing worker 1 (pid: 5755)... > > > > SIGPIPE: writing to a closed pipe/socket/fd (probably the client > > disconnected) on request / (ip 127.0.0.1) !!! > > > > uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 260] > > IOError: write error > > [pid: 5755|app: 0|req: 2/2] 127.0.0.1 () {26 vars in 277 bytes} [Sat > > Jun 29 11:20:38 2013] GET / => generated 0 bytes in 1732 msecs > > (HTTP/1.0 200) 1 headers in 44 bytes (0 switches on core 0) > > worker 1 buried after 1 seconds > > > > binary reloading uWSGI... > > > > > > Did the master really kill the http connection before worker 1 has > exited? > > Yes, all of the gateways/routers have no "graceful" reload thing. If you > change --http with http-socket you should see the difference > > -- > 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
