We are using open jdk 8 with spring boot version 2.2.4.RELEASE and embedded tomcat version 9.0.16 in our web application and since last 3 months we are frequently facing compressed class space issue. Every time when OOM occurs we have to restart application The log found from catalina.log is below
ERROR org.jgroups.logging.Log4J2LogImpl.error:Line 95 - failed executing task FD_ALL: TimeoutChecker (interval=2000 ms)
java.lang.OutOfMemoryError: Compressed class space
788][2020-07-21 10:29:12,475]- org.apache.juli.logging.DirectJDKLog.log:Line 175 - Failed to complete processing of a request
java.lang.OutOfMemoryError: Compressed class space
We have also allocated 2gb for CompressedClassSpaceSize using XX:CompressedClassSpaceSize=2g
as per some answer at OutOfMemoryError: Compressed class space