我正在运行一个由 Jetty 9.1.0.RC1(独立发行版)提供支持的在线应用程序。
我的日志文件被提供静态内容(.js、.css、.png 文件等)时随机发生的以下问题填满:
2013-11-25 07:43:37.351:WARN:oejs.ServletHandler:qtp1207851091-422: /scripts/shared/channel/channel.public.js
java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 75000/75000 ms
at org.eclipse.jetty.util.BlockingCallback.block(BlockingCallback.java:101)
at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:490)
at org.eclipse.jetty.servlet.DefaultServlet.sendData(DefaultServlet.java:893)
at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:499)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1566)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1537)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:200)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:442)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:213)
at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
at java.lang.Thread.run(Thread.java:722)
Caused by:
java.util.concurrent.TimeoutException: Idle timeout expired: 75000/75000 ms
at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:153)
at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
这同样适用于以下资源:
2013-11-26 15:09:01.219:WARN:oejs.ServletHandler:qtp1207851091-629: /Resources/Audio/IncomingMessage.wav
2013-11-25 03:02:44.904:WARN:oejs.ServletHandler:qtp1207851091-408: /Resources/Website/Users/f3c68328-d739-4680-8144-a0db598dff6b/1384157586003.png
我正在使用 servlet 3.0。有两个 DefaultServlet 的实例,一个来自 webdefault.xml,另一个来自 web.xml,用于提供用户图像(不与 .war 文件捆绑)。
前者 DefaultServlet 的配置没有修改,后者如下:
<servlet>
<servlet-name>DefaultImagesServlet</servlet-name>
<servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
<init-param>
<param-name>resourceBase</param-name>
<param-value>/echat/static/</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>DefaultImagesServlet</servlet-name>
<url-pattern>/Resources/*</url-pattern>
</servlet-mapping>
我花了过去 3 天的时间试图弄清楚这件事,但仍然被卡住了。我没有在应用程序的任何地方显式使用延续。
该问题仅在码头(重新)启动后几天出现。
任何线索在哪里寻找答案?似乎我已经用尽了所有可能的选择。
亲切的问候,
迈克尔·齐斯科夫斯基