Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#1493 closed defect (invalid)

[patch] fixing (10053, 'Software caused connection abort') error

Reported by: eugene@… 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: UI/UX:


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\", line 273
, in run
  File "C:\Python24\lib\site-packages\django\core\servers\", line 312
, in finish_response
  File "C:\Python24\lib\site-packages\django\core\servers\", line 391
, in write
  File "C:\Python24\lib\site-packages\django\core\servers\", line 443
, in send_headers
  File "C:\Python24\lib\site-packages\django\core\servers\", line 372
, in send_preamble
  File "C:\Python24\lib\", line 256, in write
  File "C:\Python24\lib\", line 243, in flush
error: (10053, 'Software caused connection abort')

Attachments (1)

django.basehttp.patch (877 bytes) - added by eugene@… 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by eugene@…

Attachment: django.basehttp.patch added

comment:1 Changed 11 years ago by Adrian Holovaty

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?

comment:2 Changed 11 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

Solution is too hackish, so I'm closing.

comment:3 Changed 11 years ago by eugene@…

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.

Note: See TracTickets for help on using tickets.
Back to Top