We have a servlet that handles incoming voice calls at customer locations, so
you can have bursts of busy time (much like web traffic).  A customer of
ours has been running this servlet (24/7) for a few months and can go weeks
at a time with no problems, but periodically they will experience a big
slowdown on the app server which does eventually recover (slows down for
maybe an hour).   We had them increase their maxThreads from 150 to 300 and
increase the heap size:

(their current server.xml settings)
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="300" minSpareThreads="25" maxSpareThreads="75"
 enableLookups="false" redirectPort="8443" acceptCount="100"
 connectionTimeout="20000" disableUploadTimeout="true" />

JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.Cla 
ssLoaderLogManager
-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
-server -Xms1024m -Xmx1536m

It seems to have improved, but the problem cropped up again.

We use log4j to perform our logging and if you notice below, we have 2 lines
of code logging some output one right after another.  typically, there is
just ms's in the log between these 2 log stmts, but when the slowdown
occurs, you can see there is about 2 secs delay which leads me to believe
the appserver has exhausted its threads and the servlet cannot get a thread
to execute on.  We have disabled logging in the past to make sure the
logging itself wasn't the problem and we still encountered the slowdown. 
Note that the slowdown isn't just here in the log, but the entire servlet
slows down, this part of the code is just a good indicator of how it is
affecting the servlet.

These 2 log stmts follow one another and use log4j internally:
LOG("ICConnectorManager.doGet: Wait time to return response:" +
(System.currentTimeMillis() - waitStart) + "ms for request ID:" + reqID);
LOG("ICConnectorManager.doGet: Looking up " + reqID + " and returning
response back to caller:" + sResponse);

This is the output from those 2 log stmts, you can see the timestamp shows 2
seconds between.
10/08/2009 09:06:24 DEBUG - ICConnectorManager.doGet: Wait time to return
response:10125ms for request ID:14252-592
10/08/2009 09:06:26 DEBUG - ICConnectorManager.doGet: Looking up 14252-592
and returning response back to caller:


My first question, what is the best tool to monitor this so we can get an
accurate description of when the problems occur and what might be at fault? 
They just started running perfmon (on a Windows system), but as of yet I
have not seen any data from it.  Is there a better monitoring tool?

Second question, what might we do to improve Tomcat performance?  Should we
continue to tweak the max threads and heap size?  Any other Tomcat settings
that we should look at that might directly relate to this server slowdown? 

     thank you


-- 
View this message in context: 
http://www.nabble.com/Tracking-down-a-Tomcat-slowdown-tp25081707p25081707.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to