Tavo Tavo - 1 year ago 162
Java Question

Metaspace throwing OutOfMemoryException

I have recently migrated from Java7 to Java8. This has caused an issue where I get

after a few hours because the GC can't free any memory. Also, the Last Ditch Collection can't resize the Metaspace to anything bigger.

I am quite convinced that this is an issue caused by a huge amount of classes being loaded by reflection. Unfortunately, I can't find a way to see what classes are being loaded. Is there a way to extract that information from a heap dump?

Answer Source

You could pass


to JVM to print what classes are being loaded

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download