Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] TimeoutExceptions and blocking read


On Tue, Dec 3, 2013 at 3:39 PM, Máté Gulyás <gulyasm@xxxxxxxx> wrote:
> Hi!
> On our production server, I spot java.util.concurrent.TimoutExceptions
> in the server log. The stacktrace is below.
> java.util.concurrent.TimeoutException: Idle
> timeout expired: 30000/30000 ms
>         at org.eclipse.jetty.util.BlockingCallback.block(
>         at org.eclipse.jetty.server.HttpConnection$Input.blockForContent(
>         at
>         at sun.nio.cs.StreamDecoder.readBytes(
>         at sun.nio.cs.StreamDecoder.implRead(
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at mypackage.ForwardingHandler.handle(
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> 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.

That is correct.

> It occurs 100-200 times a day, the average load is around 1M-2.5M requests/day.

That's the 0.01% of the requests.

> My question is: Is there any way to prevent this? Am I missing something?

If you are sure that the client is misbehaving, there is nothing you
can do unless you also control the clients.
It's something that just happens.

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.

Back to the top