  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | JSP - A mailing list about Java Server Pages specification and reference | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Tomcat is sometimes very slow using mod_jk | Tomcat is sometimes very slow using mod_jk 2006-11-15 - By Henk Fictorie
Back
Hi,
Occassionally (but often enough to trigger our monitoring tools) a tomcat page is generated way too slow, it takes then appr. 300 sec.
When I look at the logging I observe the following:
Tomcat access log: reports that the response is generated in a couple of milliseconds. mod_jk log: reports that the response is generated is just over 300 seconds Apache: reports that the response take anything between 300 seconds and 600 seconds
The response is big enough to divide it into several AJP13 response chunks. The response has neither a Content-Length header or a Transfer-Encoding header. When accessing Tomcat through the HTTP connector, chunked encoding is used.
My remarks on this: I get the feeling that the AJP13_END_RESPONSE is not sent immediately by the tomcat jk-connector, but something times out after 300 seconds on the tomcat side, thereby forcing a flush on the connection. Because of the 300 seconds timeout I think it has something todo with the Keep-Alive header The browser sends a "Keep-Alive: 300" header, this header is send to tomcat. Tomcat somehow honours this header and closes the connection after 300 seconds.
Solutions?: - will adding 'JkOptions +FlushPackets' to the apache config help? - can I somehow disable sending the Keep-Alive header to tomcat and will that help?
Any ideas/remarks?
regards Henk Fictorie -- ---- ---- ---- ---- ---- ---- ---- ---- Configuration info:
Apache 2.0.59 JkLogLevel info JkWorkersFile /usr/local/apache2/conf/workers.properties.1.2.19 JkLogFile "|/usr/local/apache2/bin/cronolog /bar/logs/apache2/%Y/%m/%d/mod_jk.80.log" JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkShmFile /usr/local/apache2/logs/jk-runtime-status JkMount /foo/* lbworker JkRequestLogFormat "%R %r %s %T"
mod_jk 1.2.19 # worker template worker.template.type=ajp13 worker.template.port=1832 worker.template.lbfactor=50 worker.template.connection_pool_timeout=600 worker.template.socket_timeout=62 worker.template.connect_timeout=30000 worker.template.prepost_timeout=30000 worker.template.recovery_options=0 worker.template.reply_timeout=600000 worker.template.retries=1
Tomcat 5.0.28 <Connector className="org.apache.coyote.tomcat5.CoyoteConnector " port="1832" minProcessors="5" maxProcessors="500" acceptCount="10" debug="0" enableLookups="true" redirectPort="8443" connectionTimeout="0" useURIValidationHack="false" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler " />
-- View this message in context: http://www.nabble.com/Tomcat-is-sometimes-very -slow-using-mod_jk-tf2636065.html#a7357578 Sent from the Tomcat - User mailing list archive at Nabble.com.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To start a new topic, e-mail: users@(protected) To unsubscribe, e-mail: users-unsubscribe@(protected) For additional commands, e-mail: users-help@(protected)
|
|
 |