Reputation: 244
I am getting Out-of-memory in Metaspace. As I understood after googling that Out-of-memory in Metaspace error comes could be due to the leak in Classloader.
So, for this I started analyzing the Heap dump in Eclipse MAT and opened 'Class Loader Explorer' which gives following :
As I understood from the above data, that com.newrelic.bootstrap.BootstrapAgent$JVMAgentClassLoader is occupying 396,707 instances which were not garbage collected. Is my understanding correct?
After I selected this row and opend "Path to GC Roots -> exclude all phantom/weak/soft Ref" and I observed that Shallow and Retained Heap are 96 and 231,040 respectively.
After I selected another row in 'Class Loader Explorer' for the class org.apache.felix.framework.BundleWiringImpl$BundleClassLoader and again opend "Path to GC Roots -> exclude all phantom/weak/soft Ref" and now I see this data :
From this data, is it safe to conclude that in this class there is a leak : com.newrelic.agent.util.DefaultThreadFactory$AgentThreadImpl which is not garbage collected?
If not then please suggest what else I should check?
Upvotes: 0
Views: 618
Reputation: 441
com.newrelic.bootstrap.BootstrapAgent$JVMAgentClassLoader is occupying 396,707 instances which were not garbage collected. Is my understanding correct? That means that
com.newrelic.bootstrap.BootstrapAgent$JVMAgentClassLoader
has loaded 2627 classes and there are 396,707 instances of those classes. In itself, that doesn't look like a problem.
The Duplicate Classes might be a good query to run to see if a class has been loaded in one classloader, then loaded again (possibly because it was updated), but the old class loader wasn't freed.
Is the thread com.newrelic.agent.util.DefaultThreadFactory$AgentThreadImpl
supposed to be alive. Check with the Thread Overview query to find what it is doing?
Upvotes: 0