Java Mailing List Archive

http://www.junlu.com/

Google
Google
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
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Tomcat is sometimes very slow using mod_jk

Tomcat is sometimes very slow using mod_jk

2006-11-15       - By Henk Fictorie

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  


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 Source code of 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 Source code of 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)


©2008 junlu.com - Jax Systems, LLC, U.S.A.