Jaspersoft goes down with error message:
2020-03-02 10:00:43,434 ERROR SystemErrorController,https-openssl-nio-8443-exec-10:83 [myorg|myuser] - Internal server error org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: GC overhead limit exceeded
Checking the the setenv.bat files in $tomcat/bin we can see the default settings:
set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx2048m -XX:MetaspaceSize=32m
set JAVA_OPTS=%JAVA_OPTS% -Xss2m -XX:+UseConcMarkSweepGC
set JAVA_OPTS=%JAVA_OPTS% -XX:+CMSClassUnloadingEnabled
Release : All Supported Clarity releases with Jaspersoft
Component : Jaspersoft
This problem is having two causes:
FIRST: The JVM you have set up on the server is too small for a Production environment, you should consider increasing this. For information, in our SAAS environments, we have 20GB of JVM assigned.
1. Check on this server to see how much available RAM there is. Make sure you account for OS RAM etc.
For you the problem comes from the fact that GC does not properly work on a small heap. It has to recover at least 2% and it can't, see below:
Excessive GC Time and OutOfMemoryError
The parallel collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line.
SECOND: Because of this, please also add -XX:-UseGCOverheadLimit to the JVM parameters and then restart. This should resolve the problem.