Issue
I have installed Tomcat7 on Debian Wheezy, the max memory is only 128Mo. So I have tried to change the file /etc/init.d/tomcat7 by changing :
if [ -z "$JAVA_OPTS" ]; then JAVA_OPTS="-Djava.awt.headless=true -Xmx128M" fi
by
if [ -z "$JAVA_OPTS" ]; then JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -XX:MaxPermSize=256m" fi
After a restart of tomcat (command : "service tomcat7 restart"), the memory hasn't changed at all. Is there another way to change it?
Thank you.
Solution
You may edit it the file /etc/default/tomcat7
; then find the line JAVA_OPTS and change it, example below:
JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -XX:+UseConcMarkSweepGC
Then restart tomcat 7:
service tomcat7 restart
Answered By - truongtx