File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes My Apache-Tomcat eating 100% Cpu usage!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "My Apache-Tomcat eating 100% Cpu usage!!" Watch "My Apache-Tomcat eating 100% Cpu usage!!" New topic

My Apache-Tomcat eating 100% Cpu usage!!

anish kumarv

Joined: May 09, 2011
Posts: 7

we are hosting web applictions using Apache-Tomcat, Past two weeks iam facing this problem, in my server suddenly the java usage is become extreme(100%) , because of this issue my clients not able to access the

application . so after i restart the tomcat only they can able to access the Web application.

Please guide to avoid critical situations.

1. How to avoid high cpu usage

2. is there any way to reduce the cpu usage once it becomes high. instead of restart the tomcat.

Please guide me guys to resolve this issue.

With Regards
Anish Kumar.V

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16914

Tomcat is not some sort of creature with a life of its own to just spntaneously crank up its CPU usage. And, since it's a fairly minimal J2EE container, its normal resource consumption isn't very high as such things go.

The first thing to check, then, is to see if you have a system memory problem. If you're using lots of virtual memory, then any app can send CPU usage through the roof. Not because the app is using the CPU, but because page-swapping is using CPU. So check the virtual/real RAM and swap stats for your machine.

If you have plenty of machine resources, the chances are very high that it's not Tomcat that's running 100% CPU, it's user-supplied software inside of Tomcat that's running 100% CPU. At that point you'll need to break out the system performance measuring tools.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: My Apache-Tomcat eating 100% Cpu usage!!
It's not a secret anymore!