Invoke VM settings for Tomcat
Posted by gregster on 06 Nov 2008 in Servers, Activity log
Tomcat was generating permgenspace errors so we fiddled with the way the VM gets invoked and came up with something better (haven't gotten the error with 10+ reload/stop-start sequences). By changing the permsize and maxpermsize we seem to have gotten past the worst of the problems.
That said, memory usage increases with each restart, so we're probably just postponing the inevitable failure. Lettuce also uses incremental garbage collection (-Xincgc). Here are the options used on lettuce (catalina.sh):
export CATALINA_OPTS='-Djava.awt.headless="true" -server -Xms256m -Xmx1024m -Xincgc -Dfile.encoding=UTF-8 -XX:MaxPermSize=128M'
So we'll try increasing maxpermsize and adding permsize params and seeing if we're any better off. Here's the proposed invocation:
export CATALINA_OPTS='-Djava.awt.headless="true" -server -Xms256m -Xmx1024m -Xincgc -Dfile.encoding=UTF-8 -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+CMSClassUnloadingEnabled'