File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat high cpu usage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat high cpu usage" Watch "Tomcat high cpu usage" New topic

Tomcat high cpu usage

Rich Dominelli

Joined: Sep 21, 2004
Posts: 5
I have a small tomcat/axis based webservice which slowly grabs more cpu over a few days and requires a restart. CPU utilization climbs to high 90's and would problably hit 100% if I did not restart.

I have seen several threads about this being caused by JDK 1.4.1. but we are on 1.4.2. Our environment is sun solaris and we are running tomcat 5.0.28.

Any suggestions on how to track the cause of this down?

Thanks for your help.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
If this was my problem I would start by using the methods in java.lang.ThreadGroup to enumerate the active Threads. If you did this in a servlet you would see the state of the response serving Threads.
I once used this to track down a bug in which Threads were created but never run - they just hung around using memory.
I agree. Here's the link:
subject: Tomcat high cpu usage
It's not a secret anymore!