Add more JVM memory in tomcat on ubuntu 9.10

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

Popular posts from this blog

How to Get Date/Time in/with GWT

Encoding URL delimiters (for GWT)