1

We have a http server and sometime it encounter the issue int the server. Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.net.SocketInputStream.read(SocketInputStream.java:210) I search this exception and get some information like the following link java.net.SocketTimeoutException: Read timed out under tomcat

It says this socketTimeout exception

It happens if and only if no data arrives within the timeout

But the socket timeout I set in the http server is 5,000ms. And I found that the request which encountered the timeout exception only cost several milliseconds totally. Even from when the socket is created, the time is also not more than 5,000ms. So I think there must be something wrong with the our http server, but I cannot come up with the reason. Can anyone give me some suggestions about this issue. Any information will be appreciated. Many thanks.

Community
  • 1
  • 1
user2256235
  • 295
  • 4
  • 15
  • Best thing to do is telnet to the port and see if it's connecting. If not, there might be different reasons to look into such as firewall, port open from this machine etc. – kotacc Oct 20 '15 at 03:07
  • I run the load test for the server and this error rate is about 1%. And both the server and client are in our local network. I print lots of log and I find that at the begging the socket might work correctly but after it handles some requests it might encounter that issue. – user2256235 Oct 20 '15 at 03:21

0 Answers0