这个跟数据库没有关系,当客户端发出请求(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