java.net.SocketTimeoutException: Read timed out

后端 未结 2 1816
情歌与酒
情歌与酒 2021-02-15 19:42

I have an application with client server architecture. The client use Java Web Start with Java Swing / AWT and the sert uses HTTP server / Servlet with Tomcat. The communicat

2条回答
  •  执笔经年
    2021-02-15 19:59

    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.

提交回复
热议问题