Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Ignoring connection already closed by client

Hi,

On Wed, Jun 14, 2017 at 8:41 AM, Sachin Kale <sachinpkale@xxxxxxxxx> wrote:
> Hi,
>
> I am using Jetty 9.2
> If request is queued for a long time in Jetty and client is timed out, it
> will still get executed.
> Is there any way to identify timed out requests and just drop them instead
> of wasting resources in executing them?
> I tried with IdleTimeout as mentioned in
> http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html
> but it seems Jetty just ignores the idle timeouts.
>
> Following is the log details:
>
> [2017-06-14 06:25:10,547] DEBUG org.eclipse.jetty.io.IdleTimeout:
> SelectChannelEndPoint@25522592{/127.0.0.1:51294<>9009,Open,in,out,-,-,5000/5000,HttpConnection}{io=0,kio=0,kro=1}
> idle timeout check, elapsed: 5000 ms, remaining: 0 ms
>
> [2017-06-14 06:25:10,547] DEBUG org.eclipse.jetty.io.IdleTimeout:
> SelectChannelEndPoint@25522592{/127.0.0.1:51294<>9009,Open,in,out,-,-,5000/5000,HttpConnection}{io=0,kio=0,kro=1}
> idle timeout expired
>
> [2017-06-14 06:25:10,547] DEBUG org.eclipse.jetty.io.WriteFlusher: ignored:
> WriteFlusher@22ca29bf{IDLE} java.util.concurrent.TimeoutException: Idle
> timeout expired: 5000/5000 ms
>
> [2017-06-14 06:25:10,547] DEBUG org.eclipse.jetty.io.AbstractEndPoint:
> Ignored idle endpoint
> SelectChannelEndPoint@25522592{/127.0.0.1:51294<>9009,Open,in,out,-,-,5000/5000,HttpConnection}{io=0,kio=0,kro
> =1}

Jetty ignores the idle timeout if the request is currently being
executed (for example, suspended).
This is a requirement of the Servlet specification.

In general, the container cannot interrupt the processing of a request.
The application code handling the request must cooperate with the
application code that wants to interrupt the request, so it is
something that you have to write.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top