This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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.
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.