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.
精彩评论