I've a Tomcat 6 installation in Ubuntu 10.04 and wanting to increase Java Heap space, I went to /etc/default/tomcat6
and uncommented and changed the following line:
JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m"
However, when I went to the Tomcat Manager Status page, I read:
JVM
Free memory: 125.29 MB Total memory: 382.43 MB Max memory: 510.43 MB
So I went to check my /etc/init.d/tomcat6
script and added echo $TOMCAT_SH
, just before start-stop-daemon --start
, to check that the variable actually went through, and I got:
# /etc/init.d/tomcat6 start
* Starting Tomcat servlet engine tomcat6
'set -a; JAVA_HOME="/usr/lib/jvm/java-6-openjdk"; source "/etc/default/tomcat6"; CATALINA_HOME="/usr/share/tomcat6"; CATALINA_BASE="/var/lib/tomcat6"; JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -XX:+UseConcMarkSweepGC -Djava.net.preferIPv4Stack=true"; CATALINA_PID="/var/run/tomcat6.pid"; CATALINA_TMPDIR="/tmp/tomcat6-tmp"; LANG="en_GB"; JSSE_HOME="/usr/lib/jvm/java-6-openjdk/jre/"; cd "/var/lib/tomcat6"; "/usr/share/tomcat6/bin/catalina.sh" start'
...done.
Which looks OK, so I was wondering why Tomcat manager says I've only 510Mb of max memory.
How can I make sure that the memory setting has been applied?