Set JAVA memory parameters in Tomcat

Edit catalina.sh file and add following line. Memory parameters can be set according to requirement.

export JAVA_OPTS="$JAVA_OPTS -server -Xss128k -Xms128M -Xmx1024M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:MaxPermSize=512M"

If you are running windows XP and having issue while running tomcat. Append the below line in setenv.bat file.
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx512m -XX:MaxPermSize=256m

No comments:

Post a Comment