Avatar of Prajal_Sutaria
Prajal_Sutaria
Flag for United States of America asked on

Tomcat occupying high CPU

I have an application running on tomcat 5.5. After 2-3 days tomcat start occupying very high CPU and application becomes unresponsibe. I have told it seems there is some sun native method which is being called unwantedly and threads are not being closed. I am attaching application thread dump over here. Can someone please take a look at this and advise what is actually happening with the application.
ThreadDump.log
Java App ServersJava

Avatar of undefined
Last Comment
Prajal_Sutaria

8/22/2022 - Mon
Ajay-Singh

I feel, its typical symptom of GC running aggressively. You can check
the following:
1. Enable gc logging, by adding "-verbose:gc -Xloggc:gc.log" to startup
options
2. Take a thread-dump when the application is not responding, analyze it
and see which thread is eating up CPU.
Prajal_Sutaria

ASKER
Abobe attached thread dump has been taken while application was not responding. Can you please check and see if there is anything suspicious ?
Prajal_Sutaria

ASKER
I'm attaching GC data as well taking at that time when application stopped responding
20090225-1005AM-gcdata-tomcat.txt
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Mick Barry

a lot of threads waiting for this lock

      at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:408)
      - waiting to lock <0x0000002a9cfd4e60> (a java.lang.Class)

start with looking up what is holding the lock

Mick Barry

full gc's are taking 5 secs so may be worth looking at a more incremental strategy

Prajal_Sutaria

ASKER
Anyone has any idea on details of this method.
java.beans.Introspector.findExplicitBeanInfo(Introspector.java:408)


Also,
What should be more incremental strategy ?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Mick Barry

worry more about the thread thats holding the lock they are waiting on.

Prajal_Sutaria

ASKER
Can you help me finding root cause for this ?
Mick Barry

pretty busy at the moment but i can try and steer you in the right direction

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Prajal_Sutaria

ASKER
Anyhelp will be appreciated. Anyone else has any idea what should I do ?
Prajal_Sutaria

ASKER
Can someone please advise what below monitor thread is pointing towards.

  at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:408)
Mick Barry

sorry I don't understand the question
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Prajal_Sutaria

ASKER
In attached thread dump maximum threads are waiting for below method.

at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:408)
      - waiting to lock <0x0000002a9cfd4e60> (a java.lang.Class)

What does this mean ? Can someone tell me what does it lead to and in which type of issue / bug / leak could be. Any help to sort this issue ?
Mick Barry

its waiting to lock the specified object
it cannot because some other thread has that object locked
search the thread dump for all references of that object and see which is holding the lock

ASKER CERTIFIED SOLUTION
Prajal_Sutaria

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.