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 Connector - 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 Connector - high cpu usage" Watch "Tomcat Connector - high cpu usage" New topic

Tomcat Connector - high cpu usage

Martin Thorpe
Ranch Hand

Joined: May 25, 2004
Posts: 45
Hello I have a problem with Tomcat running at 25% CPU useage. I have identified from the web that this is probably a problem with the ISAPI connector, but have found no information on how to fix this.

I am running Tomcat 5.5.20 on IIS 5, on Windows 2000 server.

I am using the binary connector for windows I have tried 2 versions and the latest but I still have the problem.
Below is my workers file, I wonder if there is anything in here that might help

Any hints or tips that I might bring this under control would be gratefully appreciated. By the way on my development version, of the same application, there is no problem but this is running through port number direct to Tomcat and not over IIS.

Martin Thorpe
Ranch Hand

Joined: May 25, 2004
Posts: 45
Ok for anyone who might be interested it appears that I have fixed the problem, although I will have to monitor it over the next couple of days.

What I did in the end was to alter the connector in the Tomcat server.xml file:

so in tomcatRoot\conf\server.xml

I changed this line, which was the default Tomcat shipped with:

To be this

So specifying amount of threads and a connectionTimeout seems to sort it. Now it runs up to 16 - 25% when processing but drops straight back to 00 once finished as opposed to be constantly at 25%.

Hope it helps, I'll update if the problem re-occurs.

Thanks for reading
Jeff Adama

Joined: Apr 23, 2009
Posts: 1

THANK YOU !!! That was an increadibly HUGE help!!

I did not see this as identified in Apache's bugzilla and thus just submitted it as it presents show stopper for those needing to run Tomcat behind IIS and who are not lucky to find this page.
Here is the submitted bug report:

Rainer Jung

Joined: May 18, 2009
Posts: 1
Since there is a known bug in the tcnative Tomcat connector leading to 100% CPU load:

could you please check, if you have the native Tomcat connector running (aka
known as tcnative or APR connector)? It's running as part of Tomcat, not in the web server.

If so, which version of Tomcat and tcnative are you using, and can you please
try once, whether the problem also goes away by disabling tcnative?


I agree. Here's the link:
subject: Tomcat Connector - high cpu usage
It's not a secret anymore!