目前我正在使用一个内置在 python 的应用程序。当我运行它在个人电脑,它的工作没有问题。
但是,当我将它移动到生产服务器时,它会不断向我显示附加的错误,如下所示: 。
我做了一些研究,我得到的原因是终端用户浏览器停止连接,而服务器仍然忙于发送数据。
我想知道为什么会发生这种情况,以及它在我的个人电脑上工作时,阻止它在生产服务器上正常运行的根本原因是什么。任何建议都不胜感激
Exception happened during processing of request from ('127.0.0.1', 34226)
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/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