java.net.SocketTimeoutException: Read timed out

亡梦爱人 提交于 2019-12-03 13:10:26

You haven't given us much information to go on, especially about the client side. But my suspicion is that the client side is:

  • failing to setting the Content-length header (or setting it to the wrong value),
  • failing to flush the output stream, and/or
  • not closing the output side of the socket.

Mysterious.

Based on your updated question, it looks like none of the above. Here are a couple of other possibilities:

  • For some reason the client side is either locking up entirely during serialization or taking a VERY LONG TIME.
  • There is a proxy between the client and server that is causing problems.
  • You are experiencing load-related network problems, or network hardware problems.

Another possible explanation is that you have a memory leak, and that the slowdown is caused by the GC taking more and more time as you run out of memory. This will show up in the GC logs if you have them enabled.

vetri

I think During high Concurrency, the Socket Timeout set in Tomcat is Expired and the connection is closed. The next read by Tomcat for that connection is greater than the server socket timeout specified in the server.
If you want to avoid this problem you have to increase the timeout on the server-side which is expired in your case. But not advisable.
BTW you did not give enough information. Did you increase the no of threads for connection in Tomcat? If you did, this surely would happen.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!