Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 711
user3167150 Avatar asked Jan 07 '23 17:01

user3167150


1 Answers

This exception is explained in Understand the OutOfMemoryError Exception:

Cause: On 64-bit platforms a pointer to class metadata can be represented by a 32-bit offset (with UseCompressedOops). This is controlled by the command line flag UseCompressedClassPointers (on by default). If the UseCompressedClassPointers is used, the amount of space available for class metadata is fixed at the amount CompressedClassSpaceSize. If the space needed for UseCompressedClassPointers exceeds CompressedClassSpaceSize, a java.lang.OutOfMemoryError with detail Compressed class space is thrown.

Action: Increase CompressedClassSpaceSize or you can turn off UseCompressedClassPointers. Note: There are bounds on the acceptable size of CompressedClassSpaceSize. For example -XX:CompressedClassSpaceSize=4g, exceeds acceptable bounds will result in a message such as CompressedClassSpaceSize of 4294967296 is invalid; must be between 1048576 and 3221225472.

like image 108
alban Avatar answered Jan 31 '23 08:01

alban