Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#1493 closed defect (invalid)

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

Reported by: eugene@… Owned by: adrian
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:

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@… 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by eugene@…

comment:1 Changed 8 years ago by adrian

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 8 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

Solution is too hackish, so I'm closing.

comment:3 Changed 8 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.