我正在使用嵌入球衣的码头。我的独立码头运行良好,但一段时间后它开始闲置。我在 2 毫秒内给出响应。但是它开始响应 8000 毫秒。和闲置。我对其进行了分析,但找不到任何东西。我得到那个错误:
java.lang.IllegalStateException: Committed
at org.eclipse.jetty.server.Response.resetBuffer(Response.java:1056)
at org.eclipse.jetty.server.Response.sendError(Response.java:273)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:509)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:241)
at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:664)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
我厌倦了更改线程池设置并做到了:
server.setThreadPool(new ExecutorThreadPool(64,256,10));
PS 1: https ://groups.google.com/forum/#!msg/cometd-users/5yhMwIlRVbg/ fL7V3mwWKyoJ 这里说执行器不如码头的线程池,但我不确定。
我使用:jetty-servlet 和 jetty-security 的7.4.5.v20110725 。
PS 2:我发现: http: //grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jetty/jetty-server/8.0.0.M0/org/eclipse/jetty/server/Response .java#1103
有任何想法吗?