How to increase JVM memory on Tomcat 8

2020-06-25 04:02发布

问题:

does someone knows how to increase the JVM on Tomcat 8? cause it changed from the previously version, I use to change it into the Tomcat/bin/catalina file in the following parameter:

set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" -Xms1024M -Xmx2048M

but for Tomcat 8 is not working anymore. Thanks in advance

回答1:

You need to create file under Tomcat home \ bin directory

if windows then setenv.bat

and if linux/unix then setenv.sh

and write below memory configuration into file

export CATALINA_OPTS="$CATALINA_OPTS -Xms512m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx8192m"
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxPermSize=256m"

Please refer this link:

http://crunchify.com/how-to-change-jvm-heap-setting-xms-xmx-of-tomcat/