Tomcat在SocketTimeoutException之后崩溃

时间:2013-08-31 07:00:36

标签: tomcat crash mod-proxy socket-timeout-exception

我正在使用apache mod_proxy_jk在debian lenny VPS上运行tomcat 7.0.2,这是我的AJP配置:

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" connectionTimeout="1000" minSpareThreads="5" maxThreads="100" acceptCount="64" acceptorThreadCount="1" URIEncoding="UTF-8"/>

&安培; mod_proxy使用默认配置 每隔几个小时(取决于我网站上的流量)tomcat崩溃了这个错误&amp;我必须重新启动才能继续工作:

SEVERE: Exception while dispatching incoming RPC call
java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at org.apache.coyote.ajp.AjpProcessor.read(AjpProcessor.java:331)
    at org.apache.coyote.ajp.AjpProcessor.readMessage(AjpProcessor.java:415)
    at org.apache.coyote.ajp.AjpProcessor.receive(AjpProcessor.java:353)
    at org.apache.coyote.ajp.AbstractAjpProcessor$SocketInputBuffer.doRead(AbstractAjpProcessor.java:948)
    at org.apache.coyote.Request.doRead(Request.java:422)
    at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:287)
    at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:407)
    at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:310)
    at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:169)
    at com.google.gwt.user.server.rpc.RPCServletUtils.readContent(RPCServletUtils.java:222)
    at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsGwtRpc(RPCServletUtils.java:250)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.readContent(AbstractRemoteServiceServlet.java:182)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:239)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:196)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

什么可能导致这个问题&amp;我怎么解决呢? (我的VPS最大允许线程限制为512个线程&amp;我猜这可能与问题有关)

1 个答案:

答案 0 :(得分:1)

看起来很像this GWT issue。尝试在那里提出的解决方法,比如禁用keep alive。