How to increase JVM memory on Tomcat 8

我只是一个虾纸丫 提交于 2019-12-06 08:33:55

问题


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/




回答2:


try this

JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 
-server -Xms1536m -Xmx1536m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m 
-XX:MaxPermSize=256m -XX:+DisableExplicitGC"

http://www.mkyong.com/tomcat/tomcat-jav



来源:https://stackoverflow.com/questions/35367218/how-to-increase-jvm-memory-on-tomcat-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!