Django Nonrel damaged pipe error while loading localhost

Running Django Nonrel using Google App Engine 2.6.0 and Python 2.7, I get this exception when I try to load localhost and localhost / admin for the first time (I expect this to happen with any page):

Exception happened during processing of request from ('127.0.0.1', 57011) Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/local/google_appengine/google/appengine/tools/dev_appserver.py", line 2438, in __init__ BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kwargs) File "/usr/lib/python2.7/SocketServer.py", line 641, in __init__ self.finish() File "/usr/lib/python2.7/SocketServer.py", line 694, in finish self.wfile.flush() File "/usr/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe 

Oddly enough, it only appears in Google Chrome. When using Firefox, it does not print any exceptions (or at least I was not able to replicate this problem in Firefox after many attempts).

Does anyone know something about this issue?

thanks

+4
source share
1 answer

There were several similar reports of race condition issues between Chrome and dev_appserver.py. The usual story is that Chrome opens several concurrent connections to the server, but first sends a request for a second connection. Since dev_appserver is single-threaded, the first request blocks and server freeze until someone surrenders.

Presumably starting Chrome with --disable-preconnect prevents this condition.

+5
source

Source: https://habr.com/ru/post/1380685/


All Articles