Question

I have a web application that developed using j2ee and Struts 2 MVC. Sometimes my application hit near 99% CPU usage. It's only accessed by 3 or 4 users. Anybody know why this is happening? How do I know which tasks take more CPU time in my application?

Help is highly appreciated.

Was it helpful?

Solution

It is hard to tell right away what is causing this issue, could be multiple threads (or) large number of objects (which are not GCed) (or) something else. You may need to do Thread dump analysis and Heap dump analysis to figure out what is causing the high load.

Here is oracle documentation on thread dump analysis.

Here is tool for Heap analysis

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top