-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Connection reset by peer" error. #630
Comments
After I digging this out, I think this issue coming from client side which is 499 http status code on nginx. |
not sure either. The error is correctly handled in the loop and should go on the next accept Maybe an OP in your app blocking the worker? What was the version of gunicorn? |
@benoitc It was 18.0. I think the error from long-running connection which use connections over 1 mins. After I set nginx and gunicorn timeout high, I couldn't see this logs but my doubt is still here.. why worker dead. |
I have got the same errors: [XXXX] [ERROR] Error processing request. I'm also trying to figure out what happened. |
Do you have any op running more thn 30 secs by default? If yes, then the timeout is expected. |
What do you mean by op? I have set timeout limit in my gunicorn config file, but not sure if that's the cause. |
I mean operation sorry. Maybe one part of your code is doing a long operation that prevent the worker to notify the gunicorn arbiter. At some points the arbiter will consider that the worker timed out and will kill it. An API call, a loop or another IO operation in your code are the usual suspect. |
I also get 104 error when I use Python3
My wsgi file just like the tutorial
i save this file as i use the command |
@FreedomKnight how do you get this error? Also what if you run more than one worker (which is expected) |
i thought i use browser to connect it and got this error at first time.
it seems no coused by using browser. and i add |
i don't reproduce it myself.... On python 3 you should send a binary and it should raise an error. What's the version of gunicorn? |
I forgot it, it work when i change to b"200 ok" |
@FreedomKnight you should always pass a binary as a body kn Python 3. I will check the relevant code but it should raise an exception if you give a string. |
i'm sorry about my stupid mistake, and thank you for your reply. |
Also seeing something "similar" in my logs, errno=9 though. gunicorn v17.5, workers=1, worker_class=gevent. According to the timestamps, it doesn't seem to be related to a timeout. What gives? 22486 2014-03-05 11:23:37,937 INFO glogging.py:274 "176.214.243.29 - - [05/Mar/2014:11:23:37] "GET /administrator/index.php HTTP/1.0" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3" |
@expntly it looks like we ignore that error and discard the socket in the sync worker, but not the async worker base class. So that report makes sense. Thanks. I think this is different from the original report, though. |
fix benoitc#630 Conflicts: gunicorn/workers/sync.py
I often encounter benoitc/gunicorn#630, and update gunicorn to 19.1.1 can solve this error.
I often encounter benoitc/gunicorn#630, and update gunicorn to 19.1.1 can solve this error.
Firstable, This is our run command.
/usr/bin/python /usr/local/bin/gunicorn -w 4 -b 127.0.0.1:5000 ext:app --log-level=error --error-logfile=ext_error.log
When I checked log in the morning, I could find some error logs like below.
{ERROR} /usr/local/lib/python2.7/dist-packages/gunicorn/glogging.py:219 Error processing request.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 93, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 137, in handle_request
resp.write(item)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/wsgi.py", line 313, in write
util.write(self.sock, arg, self.chunked)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 298, in write
sock.sendall(data)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 104] Connection reset by peer
2013-10-15 08:05:43 [27468] [CRITICAL] WORKER TIMEOUT (pid:31362)
2013-10-15 08:05:43 [27468] [CRITICAL] WORKER TIMEOUT (pid:31362)
How can I figure out this error?
The text was updated successfully, but these errors were encountered: