Tomcat - How to limit the maximum memory Tomcat will use
configuration, memory, tomcat
Solution
Set JAVA_OPTS in your init script,
export JAVA_OPTS="-Djava.awt.headless=true -server -Xms48m -Xmx1024M -XX:MaxPermSize=512m"
Problem
I am running Tomcat on a small VPS (256MB/512MB) and I want to explicitly limit the amount of memory Tomcat uses. I understand that I can configure this somehow by passing in the java maximum heap and initial heap size arguments; ``` -Xmx256m -Xms128m ``` But I can't find where to put this in the configuration of Tomcat 6 on Ubuntu. Thanks in advance, Gav