1

I want to increase my tomcat memory. Once run after some time I get Permgen error. I have seen many threads on this suggesting below change.

-Xms2048m -Xmx2048m -XX:MaxPermSize=2048m

But I am running my tomcat using the bleow command

exec $CATALINA_HOME/bin/catalina.sh $*

Can any one please let me know how I can add this memory increase options in my command line.

Thank you

A Paul
  • 8,113
  • 3
  • 31
  • 61

1 Answers1

1

Modify catalina.sh and append the parameters to CATALINA_OPTS variable, like this:

CATALINA_OPTS="$CATALINA_OPTS -Xms2048m -Xmx2048m -XX:MaxPermSize=2048m"

check the documentation at the header of the file:

CATALINA_OPTS (Optional): Java runtime options used when the "start", "run" or "debug" command is executed. Include here and not in JAVA_OPTS all options, that should only be used by Tomcat itself, not by the stop process, the version command etc. Examples are heap size, GC logging, JMX ports etc.

and you may want to check on that PermSize, it seems a little too much.

Camilo
  • 1,889
  • 2
  • 17
  • 16