Increase Memory Limits with an Archive or Manual Deployment

By default, Tomcat has a relatively low memory allotment. This can cause out-of-memory errors in the BA 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 BA Server WAR, edit the ~/.bashrc for the user account that starts the Tomcat service, or whatever configuration file or dialogue that contains global system variables on your BA Server machine. Set or modify the CATALINA_OPTS system variable to include reasonable minimum and maximum memory settings using the -Xms and -Xmx options. 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 BA Server archive packages, edit the start-pentaho scripts (.bat for Windows, and .sh for Linux), and modify the CATALINA_OPTS environment variable, adjusting the values of Xms and Xmx in the same manner as the previous step.

If you are modifying a Windows service for Tomcat, you must use the tomcat6.exe command to reconfigure the service parameters within a command line window. You can access Windows Services by going to the Windows Start Menu and typing services in the Search Programs and Files box. See the below example.

Windows (this only applies to a Windows service for Tomcat)

tomcat6 //US//Tomcat6 --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.