[英]Unexpected closing of connection, when keep-alive is active
經過長時間運行的事務后,我們服務器上的 HTTP 連接出現了一些問題。 下一個請求將導致異常java.net.SocketException: Unexpected end of file from server 。
如果我從客戶端關閉 Apache HTTP 服務器或 JVM 上的保持活動,它會很好地工作。
設置:
發生什么了?
...other stuff...
13:39:32.018 Do Rest call
13:39:32.111 Rest call return headers: Keep-Alive=[timeout=60, max=97], Connection=[Keep-Alive]
13:39:32.609 Do Rest call
13:39:33.849 Rest call return headers: Keep-Alive=[timeout=60, max=96], Connection=[Keep-Alive]
13:39:33.869 Do Rest call
...LONG RUNNING TRANSACTION...
13:40:05.828 Rest call return headers: Keep-Alive=[timeout=60, max=95], Connection=[Keep-Alive]
13:40:05.833 Do Rest call -> _java.net.SocketException: Unexpected end of file from server_; no trace in any log file on the server for this request
我無法弄清楚是什么導致連接斷開。 我在任何服務器日志中都找不到最后一個失敗的休息調用。 知道它是什么或我可以做些什么來進一步隔離問題嗎?
服務器端設置了連接超時,因此我們的保持活動連接將在分配的時間后超時,因此會出現間歇性錯誤。
刪除 keep-alive 並嘗試
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.