I tried to change CATALINA_OPTS AND JAVA_OPTS with no success in increasing memory for my tomcat6 on ubuntu 9.10. I tried in /etc/enviroment, I tried export CATALINA_OPTS AND JAVA_OPTS="-xMX1024M" with no success. But I found you can edit the init.d/tomcat6 and works great.
- permgen size is the application size, or how much memory you need for the application
- xmx max memory size that will be needed for operation of the application
#change the attributes in: /etc/init.d/tomcat6
if [ -z "$JAVA_OPTS" ]; then
JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -XX:MaxPermSize=256m"
fi
4 comments:
The debian way to edit the settings is to edit JAVA_OPTS in /etc/default/tomcatX.X. Thats why they check if JAVA_OPTS is set (-z).
If you edit the startup script, your changes will be overwritten by an aptitude upgrade.
Shouldn't you set CATALINA_OPTS in that file instead?
According to the docs.. JAVA_OPTS is also used when stopping an application,
Thank you, Thomas. You saved me.
Post a Comment