By default, Tomcat has a relatively low memory allotment. This can cause out-of-memory errors in the Pentaho Server from time to time. To increase the memory limit, follow the below process.
- Stop the Tomcat server or service.
- Because you are modifying your own Tomcat instance and have performed a manual deployment of the Pentaho Server WAR, edit the ~/.bashrc for the user account that starts the Tomcat service, or whatever configuration file or dialog box that contains global system variables on your Pentaho Server machine. Set or modify the
CATALINA_OPTSsystem variable to include reasonable minimum and maximum memory settings using the
-Xmxoptions. Ensure you customize these settings to fit the needs of your system.
export CATALINA_OPTS="-Xms4096m -Xmx6144m"
- If you are using a Pentaho-supplied Tomcat instance provided in Pentaho Server archive packages, edit the
.batfor Windows, and
.shfor Linux), and modify the
CATALINA_OPTSenvironment variable, adjusting the values of
Xmxin the same manner as the previous step.
export CATALINA_OPTS="-XMs4096m -Xmx6144m -XX:MaxPermSize=256m - Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
- If you are modifying a Windows service for Tomcat, you must use the
tomcat8.execommand to reconfigure the service parameters within a command line window. You can access Windows Services by going to the Windows Start Menu and typing
servicesin the Search Programs and Files box.
tomcat8 //US//Tomcat8 --JvmMs=4096m --JvmMx=6144m
- Start the Tomcat server or service.
Your Tomcat server now has increased minimum and maximum memory limits. You can adjust the
JvmMx number (this parameter specifies the maximum limit) to a higher number if you prefer. However, if the Java virtual machine refuses to start with increased limits, then you will have to add more RAM to your system, stop some memory-intensive services, or reduce the maximum memory limit to a lower number. This problem occurs when there is not enough contiguous memory available to assign to the JVM, and appears to happen on Windows at lower thresholds than on other operating systems.