[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] TimeoutExceptions and blocking read
|
Hi!
On our production server, I spot java.util.concurrent.TimoutExceptions
in the server log. The stacktrace is below.
java.io.IOException: java.util.concurrent.TimeoutException: Idle
timeout expired: 30000/30000 ms
at org.eclipse.jetty.util.BlockingCallback.block(BlockingCallback.java:103)
at org.eclipse.jetty.server.HttpConnection$Input.blockForContent(HttpConnection.java:457)
at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:130)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.read1(BufferedReader.java:205)
at java.io.BufferedReader.read(BufferedReader.java:279)
at java.io.Reader.read(Reader.java:100)
at com.google.common.io.CharStreams.copy(CharStreams.java:244)
at com.google.common.io.CharStreams.toStringBuilder(CharStreams.java:288)
at com.google.common.io.CharStreams.toString(CharStreams.java:262)
at mypackage.ForwardingHandler.handle(ForwardingHandler.java:72)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
As far as I can tell, the timeouts happen because when the server
tries to read the inputstream, the client does not send -1 or any
data, so the reading operations blocks, and then the timeout occurs
after 30 seconds.
It occurs 100-200 times a day, the average load is around 1M-2.5M requests/day.
My question is: Is there any way to prevent this? Am I missing something?
Specs:
Embedded jetty. lib: jetty-all-9.0.4.v20130625.jar
The stream is converted to String using the guava r14.01 library.
Thanks in advance.
Mate Gulyas