您的位置:首页 > 编程语言 > Go语言

django an established connection was aborted by the software in you host machine

2012-12-12 10:41 597 查看
Exception happened during processing of request from ('127.0.0.1', 52690)
Traceback (most recent call last):
File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
self.finish_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python27\lib\site-packages\django-1.4-py2.7.egg\django\core\servers\basehttp.py", line 139, in __init__
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
File "C:\Python27\lib\SocketServer.py", line 641, in __init__
self.finish()
File "C:\Python27\lib\SocketServer.py", line 694, in finish
self.wfile.flush()
File "C:\Python27\lib\socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine


 上面的异常总是在我刷新页面或者重新select serverType的时候出现,这样意味着可能刚才在排队执行的ajax请求在没有接收数据之前抛弃了链接,也就是“ajax发了请求,但是转开了,不再接收数据了。。。。” 然后在客户端就弹出了一个没有任何提示信息的弹出框。。。。



/article/4331975.html 这篇文章《windows错误代码解析》 里提到10053错误:

WSAECONNABORTED (10053) Software caused connection abort.

一个已建立的连接被你的主机上的软件终止,可能是因为一次数据传输超时或是协议错误。


  每次页面刷新,然后就传输数据超时?或者说页面停留太久,请求太过于频繁?就abort connect了?

问题:页面上频繁的setTimeout定时请求,然后每次页面在切换走的时候,那些个setTimeout留下的残余ID,没有被清除掉。

解决方案: 为window绑定beforeunload事件,清除所有残留的setTimeout的ID。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐