AJP挂起60秒(Tomcat7 + apache2.2 + mod_jk + CentOS)

时间:2014-12-12 05:09:31

标签: apache2 tomcat7 mod-jk ajp

我正在使用Tomcat + Apache2.2 + mod_jk。真的有几个请求挂了60个ses。 如果有人有相同的经历或知道原因,请告诉我 堆栈是:

org.apache.tomcat.jni.Socket.sendbb(Native Method)
org.apache.coyote.ajp.AjpAprProcessor.output(AjpAprProcessor.java:293)
org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1224)
org.apache.coyote.Response.doWrite(Response.java:499)
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:485)
org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:464)
org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:302)
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:527)
org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:152)
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:119)
org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:336)
java.io.Writer.write(Writer.java:140)
com.opensymphony.module.sitemesh.parser.TokenizedHTMLPage.writeBody(TokenizedHTMLPage.java:35)
com.opensymphony.sitemesh.compatability.HTMLPage2Content.writeBody(HTMLPage2Content.java:31)
com.opensymphony.sitemesh.compatability.Content2HTMLPage.writeBody(Content2HTMLPage.java:44)
com.opensymphony.module.sitemesh.taglib.decorator.BodyTag.doEndTag(BodyTag.java:26)
org.apache.jsp.WEB_002dINF.config.decorators.main_jsp._jspx_meth_decorator_005fbody_005f0(main_jsp.java:362)

1 个答案:

答案 0 :(得分:0)

默认情况下,AJP在60秒失败后不会尝试新连接。您可以使用ProxyPass中的重试参数更改此设置,例如(下面的5秒示例)

 ProxyPass / ajp://localhost:8009/mfolder/ retry=5