Opened 19 years ago

Closed 19 years ago

Last modified 17 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: 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)

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

Download all attachments as: .zip

Change History (4)

by eugene@…, 19 years ago

Attachment: django.basehttp.patch added

comment:1 by Adrian Holovaty, 19 years ago

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 by Adrian Holovaty, 19 years ago

Resolution: invalid
Status: newclosed

Solution is too hackish, so I'm closing.

comment:3 by eugene@…, 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.

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