flask request error ”Broken pipe”

Exception happened during processing of request from ('127.0.0.1', 41786)
Traceback (most recent call last):
  File "/usr/lib64/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib64/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib64/python2.7/SocketServer.py", line 657, in __init__
    self.finish()
  File "/usr/lib64/python2.7/SocketServer.py", line 716, in finish
    self.wfile.close()
  File "/usr/lib64/python2.7/socket.py", line 283, in close
    self.flush()
  File "/usr/lib64/python2.7/socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

网上搜了都说是flask dev会出现的错误,然而我用gunicorn部署后,访问其中一个页面也报了这个错误,是不是请求的数据太多就会出现这个错误。

10 comments