#1493 closed defect (invalid)
[patch] fixing (10053, 'Software caused connection abort') error
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Management commands) | Version: | |
Severity: | minor | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This patch suppresses logging of connection aborts, which are quite normal, especially with prefetching. I got them pretty frequently with Django's runserver. They are mostly harmless but distracting:
Traceback (most recent call last): File "C:\Python24\lib\site-packages\django\core\servers\basehttp.py", line 273 , in run self.finish_response() File "C:\Python24\lib\site-packages\django\core\servers\basehttp.py", line 312 , in finish_response self.write(data) File "C:\Python24\lib\site-packages\django\core\servers\basehttp.py", line 391 , in write self.send_headers() File "C:\Python24\lib\site-packages\django\core\servers\basehttp.py", line 443 , in send_headers self.send_preamble() File "C:\Python24\lib\site-packages\django\core\servers\basehttp.py", line 372 , in send_preamble self._write( File "C:\Python24\lib\socket.py", line 256, in write self.flush() File "C:\Python24\lib\socket.py", line 243, in flush self._sock.sendall(buffer) error: (10053, 'Software caused connection abort')
Attachments (1)
Change History (4)
by , 19 years ago
Attachment: | django.basehttp.patch added |
---|
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Solution is too hackish, so I'm closing.
comment:3 by , 19 years ago
There is no other solution. And it is all about the special case --- clients can abort web connections at will and it is normal behavior. We see the 10053 "error" on Windows because Python's implementation on Windows propagates it to the code, while Unix implementation eats it up. BTW, it was introduced by a Python update (Python 2.4.2?). Before that it worked identically on both platforms --- that's why we didn't see it before.
I am reopening it "just in case". It's up to you to make a final call. At the end of the day it is harmless.
This solution -- isolating that particular exception -- seems a bit hackish and special-casish. Any other way to solve the problem at a different level in the code?