Sometimes, Tomcat may be slow or even crashing due to a lack of RAM. In the log files, you will see notifications like these:
GC Limits Exceeded
This means that the "garbage collector", a java process, is running too often and is unable to free memory. When this occurs, you have to allocate more RAM to Tomcat.
Memory allocation settings for APG Tomcat are now located in an <operating_system>-service.properties file. The default path of this file is
Here's a sample of the service.properties files, focusing on the parameters to edit. The lines in red are the ones to be tweaked according to your settings.
[]
#==================================== # Initial Java Heap Size (in MBytes) #==================================== memory.init=256 #====================================# Maximum Java Heap Size (in MBytes) #==================================== memory.max=512 #=================================================== # Additional Java Parameters, starting from index 1 #===================================================
[]
jvm.param.1=-Djava.awt.headless=true jvm.param.2=-XX:MaxPermSize=128m jvm.param.3=-Dcatalina.base="$MODULE_HOME$" jvm.param.4=-Dcatalina.home="$MODULE_HOME$" jvm.param.5=-Djava.endorsed.dirs="$MODULE_HOME$"/endorsed jvm.param.6=-Djava.io.tmpdir="$MODULE_HOME$"/temp jvm.param.7=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger jvm.param.8=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager jvm.param.9=-Djava.util.logging.config.file="$MODULE_HOME$"/conf/logging.properties jvm.param.10=-d64
[]
If you modify these values or any other value in the <operating_system>-service.properties file, do not forget to reinstall the service to save these new settings permanently. Otherwise, they will not be taken into account. Here's the command to re/install a service (for Linux):
/opt/APG/bin/manage-module.sh service update Tomcat
While this entry focuses mainly on Tomcat, it also applies to other APG modules like the Backend or the Collector-Manager in the same way.