javamemory-leaksjava-8out-of-memorymetaspace

OutOfMemoryError: Compressed class space


I got this error:

 "java.lang.OutOfMemoryError: Compressed class space"

and until I'll figure out what's the trigger, I tried to disabling compressed class pointers with

-XX:-UseCompressedClassPointers.

but I still get this error. how is it possible?

Thanks!


Solution

  • Compressed Class space is part of the metaspace.

    Looks like your resolution is to either increase max metaspace size, or you may potentially have a leaky classloader.

    Usually, this error is thrown when there is insufficient space to allocate an object in the Java heap. In this case, The garbage collector cannot make space available to accommodate a new object, and the heap cannot be expanded further. Also, this error may be thrown when there is insufficient native memory to support the loading of a Java class. In a rare instance, a java.lang.OutOfMemoryError may be thrown when an excessive amount of time is being spent doing garbage collection and little memory is being freed.