Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15178 closed Uncategorized (worksforme)

Development server hangs very often when used with IE9 beta

Reported by: cataliniacob Owned by: nobody
Component: Core (Other) Version: 1.3-beta
Severity: Normal Keywords: ie9 development-server
Cc: cataliniacob Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

For almost every request made by IE9 beta the development server hangs or results in the following stacktrace:

----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51855)
Traceback (most recent call last):
  File "C:\Python26\lib\SocketServer.py", line 283, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python26\lib\SocketServer.py", line 309, in process_request
    self.finish_request(request, client_address)
  File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "d:\django-sites\django-trunk\django\core\servers\basehttp.py", line 569, in __init__
    BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "C:\Python26\lib\SocketServer.py", line 617, in __init__
    self.handle()
  File "d:\django-sites\django-trunk\django\core\servers\basehttp.py", line 609, in handle
    self.raw_requestline = self.rfile.readline()
  File "C:\Python26\lib\socket.py", line 444, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 10054] An existing connection was forcibly closed by the remote host
----------------------------------------

To reproduce this, for me it's enough to start a new project with django-admin, run the development server and try to load an URL. Sometimes it takes one or two refreshes of the page to get the exception. After the exception appears the development server is completely hung, it won't respond to requests from other browsers until it's restarted. This makes the development server totally unusable in combination with IE9 beta.

This thread suggests that other people experience this as well.

Software versions that I used:

  • Django SVN HEAD from today (revision 15343)
  • IE9 beta
  • Python 2.6.6 32 bit
  • Windows 7 64 bit

Attachments (0)

Change History (10)

comment:1 Changed 3 years ago by cataliniacob

  • Cc cataliniacob added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by russellm

  • Component changed from Uncategorized to Core framework
  • Resolution set to worksforme
  • Status changed from new to closed

Jezdez hasn't been able to reproduce this; the mailing list thread seems to suggest that the problem may lie with network settings on the box in question.

If you can narrow down *specific* test conditions that reproduce, feel free to reopen with details.

comment:3 follow-up: Changed 3 years ago by ufef

I'm experiencing the same issue.
Django 1.1.2, Python 2.6, Windows 7 64bit, IE9 beta.

Can be reproduced immediately by using Ctrl+F5 for refresh.

I am not going to reopen as I guess it might have nothing to do with Django in particular.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 3 years ago by jezdez

Replying to ufef:

I'm experiencing the same issue.
Django 1.1.2, Python 2.6, Windows 7 64bit, IE9 beta.

Can be reproduced immediately by using Ctrl+F5 for refresh.

I am not going to reopen as I guess it might have nothing to do with Django in particular.

Would you be so kind and disable the Windows (or any other) firewall software for a moment and try again?

comment:5 in reply to: ↑ 4 Changed 3 years ago by cataliniacob

Replying to jezdez:

Would you be so kind and disable the Windows (or any other) firewall software for a moment and try again?

I tried disabling the Windows firewall and the problem persists. I also upgraded to IE9 RC and it still happens. NOD32 is running on the machine with problems and has some web access protection feature that might interfere but disabling that doesn't help either.

However, on 2 other PCs running Vista and IE9 I'm not seeing the problem. They didn't have NOD32, I added it on one but it still works. So far the only obvious difference between the 2 machines where I saw it working and the 2 where it doesn't is Vista vs. Windows 7. Jezdez, which one of the two did you test?

comment:6 Changed 3 years ago by anonymous

  • Easy pickings unset
  • Severity set to Normal
  • Type set to Uncategorized

I've run into this issues in earlier django versions with certain browsers. One solution I found is to avoid using any aliases like http://localhost:8000/ and instead use http://127.0.0.1:8000/

comment:7 Changed 3 years ago by anonymous

  • UI/UX unset
  • Version changed from SVN to 1.3-beta

I also had the problem with IE9, I foudnt hat by using the real IP address of the machine when starting the dev server instead of the default seemed to resolve the issue. Not sure why or whats really going there but this issue is popping up more and more doing some google searches.

comment:8 follow-up: Changed 3 years ago by PaulM

If anyone who has this problem is can provide a wireshark dump of the traffic while this issue is being seen, it might help the rest of us replicate/debug it.

I'd be willing to bet that this issue (at least some incarnations of it) may be due to the single-threaded nature of the dev server in the current stable versions of Django. If a IE has opened a request, it may not be properly closing it, or may leave it open in the background to finish downloading something when the page is refreshed, leaving the one server thread hanging, never to complete.

The new multithreaded dev client may fix this issue.

comment:9 Changed 3 years ago by jpablo.romero@…

Using the ip of the machine solved the problem for us.

comment:10 in reply to: ↑ 8 Changed 3 years ago by cataliniacob

Replying to PaulM:

I'd be willing to bet that this issue (at least some incarnations of it) may be due to the single-threaded nature of the dev server in the current stable versions of Django.
The new multithreaded dev client may fix this issue.

Indeed, I can confirm that changeset 16427 (which makes the development server multithreaded) fixes the bug for me. Going back to changeset 16426 makes it fail again. Sorry for trying it out so late after PaulM's suggestion.

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.