Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jetty IdleTimeout

Tags:

jetty

jetty-9

I am migrating from jetty7.6 to jetty-9.2. I am seeing that default value of idletimeout for jetty connections is reduced 10 times.

In jetty-7.6

<Set name="maxIdleTime">300000</Set>

In jetty-9.2:

<Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set>

Why So ?

And because of this I am continuously getting below exception :

WARN:oejs.HttpChannel:qtp607635164-14195: Commit failed
java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:156)
at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)..........

Thanks, Anuj

like image 381
Anuj Khandelwal Avatar asked Aug 28 '14 12:08

Anuj Khandelwal


People also ask

What is Jetty Idletimeout?

The Jetty default setting for the maxIdleTime property is 5 minutes (300000 milliseconds). This time-out can be triggered if evaluation time in the Dgraph process exceeds 5 minutes.

How do you set up a jetty?

Jetty POJO Configuration You can achieve this either by: Writing Java code to directly instantiate and assemble Jetty objects. This is referred to as Embedding Jetty. Using Jetty XML configuration, which is an Inversion of Control (IoC) framework, to instantiate and assemble Jetty objects as XML objects.


1 Answers

put this in your ${jetty.base}/start.ini

jetty.http.idleTimeout=300000

that will restore your previous expectations.

It was changed from a default of 5 minutes to 30 seconds as a timeout simply because that's a better choice for the majority of websites.

like image 193
Joakim Erdfelt Avatar answered Oct 20 '22 19:10

Joakim Erdfelt