Hi,
Here is our Jetty 9.2.3 server configuration and followed by the
“java.util.concurrent.TimeoutException” stack trace I end up getting on our
server.
Scenario: In our dev environment, I am constantly sending 25 concurrent
requests at a time to the Jetty server and I immediately get
“java.util.concurrent.TimeoutException” exception for some of the requests, not
all.
Exception: Full stack trace is pasted below. Exception occurs after reading the
partial json request in the http request body and then rest of the json request
doesn’t come through the http request’s input stream thereby causing IO block
thats kicks in the idle time out milliseconds and times out.
Where am I going wrong thats causing time out exception? Please advice. Thank
you.
Server Configuration:
//new ExecutorThreadPool(corePoolSize, maxPoolSize, keepAliveTimeout,
TimeUnit.SECONDS)
Server server = new Server(new ExecutorThreadPool(25, 50, 30,
TimeUnit.SECONDS));
HttpConfiguration configuration = new HttpConfiguration();
configuration.setRequestHeaderSize(8192);
LowResourceMonitor lowResourceMonitor = new LowResourceMonitor(server);
lowResourceMonitor.setLowResourcesIdleTimeout(150);
lowResourceMonitor.setMaxConnections(700);
server.addBean(lowResourceMonitor);
ServerConnector connector = new ServerConnector(server, new
HttpConnectionFactory(configuration));
connector.setHost(host);
connector.setPort(port);
connector.setIdleTimeout(300);
connector.setAcceptQueueSize(256);
connector.setReuseAddress(true);
connector.accept(1);
server.setConnectors(new Connector[] { connector });
Exception:
2014-11-02 20:17:36,481 [ERROR] [pool-39-thread-13] c.t.gth.e.DE - Error trying
to get: java.io.IOException: java.util.concurrent.TimeoutException: Idle
timeout expired: 200/200 ms
java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout
expired: 200/200 ms
at
org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:234)
~[jetty-util-9.2.3.v20140905.jar:9.2.3.v20140905]
at
org.eclipse.jetty.server.HttpInputOverHTTP.blockForContent(HttpInputOverHTTP.java:66)
~[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at
org.eclipse.jetty.server.HttpInput$1.waitForContent(HttpInput.java:456)
~[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:121)
~[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
~[na:1.7.0_51]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
~[na:1.7.0_51]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) ~[na:1.7.0_51]
at java.io.InputStreamReader.read(InputStreamReader.java:184)
~[na:1.7.0_51]
at java.io.Reader.read(Reader.java:140) ~[na:1.7.0_51]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2001)
~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1980)
~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1957)
~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1907)
~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.toString(IOUtils.java:778)
~[commons-io-2.4.jar:2.4]
at org.apache.commons.io.IOUtils.toString(IOUtils.java:803)
~[commons-io-2.4.jar:2.4]
at com.xyz.gth.adapter.MOP.convertStreamToString(MOP.java:729)
~[bdd-1.19.18.3.3.1.jar:1.19.18.3.3.1]
at com.xyz.gth.adapter.MOP.handleRequest(MOP.java:129)
~[bdd-1.19.18.3.3.1.jar:1.19.18.3.3.1]
at
com.xyz.gth.adapter.MoPubFilterAdapter.handleRequest(MoPubFilterAdapter.java:65)
~[bdd-1.19.18.3.3.1.jar:1.19.18.3.3.1]
at com.xyz.gth.e.ED.getTBR(ED.java:1600)
[bdd-1.19.18.3.3.1.jar:1.19.18.3.3.1]
at com.xyz.gth.e.ED.process(ED.java:613)
[bdd-1.19.18.3.3.1.jar:1.19.18.3.3.1]
at com.xyz.gth.eHandler.handle(eHandler.java:122)
[bdd-1.19.18.3.3.1.jar:1.19.18.3.3.1]
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at org.eclipse.jetty.server.Server.handle(Server.java:497)
[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
[jetty-server-9.2.3.v20140905.jar:9.2.3.v20140905]
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
[jetty-io-9.2.3.v20140905.jar:9.2.3.v20140905]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_51]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 200/200
ms
at
org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:156)
~[jetty-io-9.2.3.v20140905.jar:9.2.3.v20140905]
at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
~[jetty-io-9.2.3.v20140905.jar:9.2.3.v20140905]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
~[na:1.7.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
~[na:1.7.0_51]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
~[na:1.7.0_51]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
~[na:1.7.0_51]
... 3 common frames omitted
Rajiv_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users