vicker313 tech blog

October 3, 2010

How to adjust Tomcat Reserved Memory

Filed under: Tomcat — Tags: , , , — vicker313 @ 8:37 am

By default, Tomcat Service is running under memory limit to 64MB. Java Memory Heap Exception might occur if the application has no enough memory to use. To increase or adjust the memory limit in Tomcat Service, simply edit $TOMCAT/bin/catalina.bat (or catalina.sh in Linux) and look for JAVA_OPTS:

set JAVA_OPTS = ""

Add in -Xms128m -Xmx256m to JAVA_OPTS. Xms is the initial memory when Tomcat is run while Xmx is the maximum memory that Tomcat can use.

set JAVA_OPTS = "-Xms128m -Xmx256m"

Advertisements

Create a free website or blog at WordPress.com.