Java 如何在 Tomcat 8 上增加 JVM 内存
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35367218/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to increase JVM memory on Tomcat 8
提问by Mario Echeverría
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:
有人知道如何在 Tomcat 8 上增加 JVM 吗?由于它从以前的版本更改,我使用以下参数将其更改为Tomcat/bin/catalina文件:
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
但是对于 Tomcat 8 不再工作了。提前致谢
回答by Pankaj Pandey
You need to create file under Tomcat home \ bin directory
需要在Tomcat home\bin目录下创建文件
if windows then setenv.bat
如果窗户那么 setenv.bat
and if linux/unix then setenv.sh
如果是 linux/unix 那么 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/
http://crunchify.com/how-to-change-jvm-heap-setting-xms-xmx-of-tomcat/