Getting error with Django while requesting any url
I am running django on django's development server. It was working fine before but from yesterday i keep getting this error on the linux command line where server was running.
Exception happened during processing of request from ('57.xx.xx.123', 63721)
Traceback (most recent call last):
File "/opt/python27/lib/python2.7/SocketServer.py", line 284, in _handle_reque 开发者_运维技巧 st_noblock
self.process_request(request, client_address)
File "/opt/python27/lib/python2.7/SocketServer.py", line 310, in process_reque st
self.finish_request(request, client_address)
File "/opt/python27/lib/python2.7/SocketServer.py", line 323, in finish_reques t
self.RequestHandlerClass(request, client_address, self)
File "/opt/python27/lib/python2.7/site-packages/django/core/servers/basehttp.p y", line 570, in __init__
BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
File "/opt/python27/lib/python2.7/SocketServer.py", line 641, in __init__
self.finish()
File "/opt/python27/lib/python2.7/SocketServer.py", line 694, in finish
self.wfile.flush()
File "/opt/python27/lib/python2.7/socket.py", line 301, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
can anyone guide me that why it started happening now
This happen only 1 out of 10 times
"Broken pipe" means that there was still outgoing data on a file descriptor (a socket, in this case) when the destination closed down.
In this case, the most likely cause is the browser closing the connection before the Django development server has sent the entire response.
Occasionally I'll see a broken pipe after an exception, or when connecting to my Linux box form Windows when doing cross-browser/platform testing. I'm not exactly sure what causes these errors, but restarting Django's development server is all I know to do to fix it.
精彩评论