Hi,
From a programmatic point of view

Many thanks for all the suggestions. I found a simple tool called StackTrace from 
http://www.adaptj.com/root/main/tracehowtos#ht0 to help me take thread dumps from Tomcat. 
I found when the CPU load was high that there was a thread from the suspect web app 
running. In contrast, thread dumps taken when CPU load was normal showed no such threads. 
The line that the web app thread was running at is a simple - data += "\n"; - 
this is in a loop collecting form data from hidden vars created by JavaScript code. It's 
been suggested by ny colleagues that the JVM could be running out of memory since a new 
String object is created for each +=. The String data ends up being very long anyway. Any 
thoughts on this would be appreciated.
Also, would anyone know how to monitor Tomcat's I/O activities? I understand 
that thrashing could be a drain on memory resources.
Thanks again for everybody's help!

You could replace the data += "\n" code with a StringBuilder (Java6) or a StringBuffer - this would reduce the number of intermediate objects being created quite significantly

Kev

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to