论坛首页 Java企业应用论坛

关于异常Connection reset by peer: socket write error 的理解

浏览 2985 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2010-02-03   最后修改:2010-05-27
Connection reset by peer: socket write error
这个跟数据库没有关系,当客户端发出请求(request)后,如果还没有完全获得服务端的响应(response),客户端与服务器段的连接断开(例如断网、按了“停止”按钮、或者客户端浏览器关闭等),服务器端就会抛出此Exception。


Causes and solutions

This exception occurs when a client made a request, and before receiving the full response, either of the following happened:

client's browser has been closed.
client's connection has been disconnected.
client presses the stop button.
This exception is normally harmless. It does not seem possible to trap this exception with J2SE.

Connection reset by peer的原因:
经常出现的Connection reset by peer: 原因可能是多方面的,不过更常见的原因是:
①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;
②:客户关掉了浏览器,而服务器还在给客户端发送数据;
③:浏览器端按了Stop

本文不是原创!!来源于http://www.cnblogs.com/kaixin110/archive/2008/03/22/1117394.html
  • 大小: 19 KB
   发表时间:2010-02-04  
看看tcp/ip协议就知道了,主要情况通讯一方down了,发送数据的一方就收到这个异常。
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics