My Tomcat 7 Works fine, but when i retrieve the run command, return:
# ps -ef | grep java
tomcat7 18794 1 2 09:30 ? 00:01:09 /usr/lib/jvm/default-java/bin/java
-Djava.util.logging.config.file=/var/lib/tomcat7/conf/logging.properties
-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms2048m -Xmx2048m -Djava.endorsed.dirs=/usr/share/tomcat7/endorsed -classpath /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
-Dcatalina.base=/var/lib/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.io.tmpdir=/tmp/tomcat7-tomcat7-tmp org.apache.catalina.startup.Bootstrap start root 20085 18341 0 10:13 pts/0 00:00:00 grep java
I can't remove the "-Xmx128m" parameter.
I change this files:
/usr/share/tomcat7/bin/setenv.sh
/usr/share/tomcat7/defaults.template
But the parameter persist.
The xmx & xms are assigned correctly to 2048m, but i want a correct start.
Did you search through this file ? :
/etc/default/tomcat7
Find the line with JAVA_OPTS="-Djava.awt.headless=true
and change the -Xmx128 parameter
Solved!.
Just edit /etc/default/tomca7
and change this line:
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
to this:
JAVA_OPTS="-Djava.awt.headless=true -Xmx2048m -XX:+UseConcMarkSweepGC"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.