How to increase Java heap space for a tomcat app
Posted
by Ankur
on Stack Overflow
See other posts from Stack Overflow
or by Ankur
Published on 2010-04-27T04:41:53Z
Indexed on
2010/04/27
4:43 UTC
Read the original article
Hit count: 295
There are lots of questions that ask this or a similar question.
They all give the command that has to be executed, what I don't understand is where do I write this command. I want to permanently increase the heap space for my tomcat apps.
I read this page http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html and it says under the Tomcat section
Stop Tomcat server, set environment variable CATALINA_OPTS, and then restart Tomcat. Look at the file tomcat-install/bin/catalina.sh or catalina.bat for how this variable is used. For example,
set CATALINA_OPTS=-Xms512m -Xmx512m (Windows, no "" around the value) export CATALINA_OPTS="-Xms512m -Xmx512m" (ksh/bash, "" around the value) setenv CATALINA_OPTS "-Xms512m -Xmx512m" (tcsh/csh, "" around the value)
So I replaced the line set CATALINA_OPTS= with set CATALINA_OPTS=-Xms512m -Xmx512m
But I still get the error.
© Stack Overflow or respective owner