Tavo Tavo - 9 months ago 57
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?


You could pass


to JVM to print what classes are being loaded