This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Tomcat 6.0.16 using 100% of CPU? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 6.0.16 using 100% of CPU?" Watch "Tomcat 6.0.16 using 100% of CPU?" New topic
Author

Tomcat 6.0.16 using 100% of CPU?

M Burke
Ranch Hand

Joined: Jun 25, 2004
Posts: 391
Tomcat 6.0.16 running on JVM 1.6 Windows 2003 occasionally uses 100% of CPU(sometimes during off peak hours) .Is there any way to find out which thread is consuming the most CPU ? How can we do a thread dump if needed.Though I have specified a timeout in my config file, I see some request threads(like for a image) with enormous processing times.Could this be the culprit.How can we go about resolving this issue.

These are the configurations in server.xml

<Connector port="8080" protocol="HTTP/1.1" redirectPort="8443" address="localhost"

enableLookups="false" disableUploadTimeout="true"

maxThreads="200" acceptCount="100" connectionTimeout="120000" maxHttpHeaderSize="4096" />

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"

maxThreads="150" scheme="https" secure="true"

clientAuth="false" sslProtocol="TLS" />

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"

enableLookups="false" disableUploadTimeout="true"

>
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Dear Burke,

Here is how to make and analyse thread dumps: http://java-monitor.com/forum/showthread.php?t=317 http://java-monitor.com/forum/showthread.php?t=616

You will need to translate the way of working to match your specific question, but I am sure you will manage.

Let us know what you find.

Kees Jan


Java-monitor, JVM monitoring made easy <- right here on Java Ranch
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16460
    
  23

jconsole may help.

I've been known to actually pause each running thread in Tomcat using a debugger in some obscure cases, though, just to look at what was on the procedure stack.


Customer surveys are for companies who didn't pay proper attention to begin with.
sateesh narahari
Greenhorn

Joined: Jan 11, 2010
Posts: 3
M Burke wrote:Tomcat 6.0.16 running on JVM 1.6 Windows 2003 occasionally uses 100% of CPU(sometimes during off peak hours) .Is there any way to find out which thread is consuming the most CPU ? How can we do a thread dump if needed.Though I have specified a timeout in my config file, I see some request threads(like for a image) with enormous processing times.Could this be the culprit.How can we go about resolving this issue.

These are the configurations in server.xml

<Connector port="8080" protocol="HTTP/1.1" redirectPort="8443" address="localhost"

enableLookups="false" disableUploadTimeout="true"

maxThreads="200" acceptCount="100" connectionTimeout="120000" maxHttpHeaderSize="4096" />

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"

maxThreads="150" scheme="https" secure="true"

clientAuth="false" sslProtocol="TLS" />

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"

enableLookups="false" disableUploadTimeout="true"

>


You can download Tcat Server ( Disclaimer: I work on the product), which shows you the CPU and memory utilization and also shows you the current status of all threads running in Tomcat. That would be another way to look at threads ( in addition to what Tim and others suggested ).

Best Regards,
Sateesh

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 6.0.16 using 100% of CPU?