开发者

Tomcat memory settings

开发者 https://www.devze.com 2023-02-06 09:38 出处:网络
I am getting out of memory exception in my tomcat,Could any one explain how to do settings and what are best values have to set 开发者_如何转开发based on calculation of my total memory.Thanks in Advan

I am getting out of memory exception in my tomcat,Could any one explain how to do settings and what are best values have to set 开发者_如何转开发based on calculation of my total memory.Thanks in Advance.

Regards, Chaitu


Tomcat uses java startup flags to set memory configuration. You'll want to set your JAVA_OPTS environment variable to include -Xmx512m ( or however much heap space you think you'll need ).

export JAVA_OPTS="-Xmx512m"

If you get PermGen memory exceptions you may need to also set MaxPermSize:

export JAVA_OPTS="-Xmx512m -XX:MaxPermSize=128m"

The normal catalina startup scripts will incorporate the JAVA_OPTS environment variable into their normal startup process.

0

精彩评论

暂无评论...
验证码 换一张
取 消