Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 6.0.16 using 100% of CPU?

 
M Burke
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18002
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sateesh narahari
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic