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.
Connection reset by peer的原因:
經常出現的Connection reset by peer: 原因可能是多方面的,不過更常見的原因是:
①:服務器的併發連接數超過了其承載量,服務器會將其中一些連接Down掉;
②:客戶關掉了瀏覽器,而服務器還在給客戶端發送數據;
③:瀏覽器端按了Stop