Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Tomcat 6.0.16 using 100% of CPU?

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"

>
 
JavaMonitor Support
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 24867
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

reply
    Bookmark Topic Watch Topic
  • New Topic