I have a Tomcat6 running on a Windows2003 machine. I deployed 2 Grails apps on this server and I soon noticed that everything was crashing sometime after the deploy with a class
Actual way to do it (in Catalina.bat),
set "JAVA_OPTS=-Djava.awt.headless=true -server -Xms512m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"
add this line in such a position so that this JAVA_OPTS is transferred to any of _EXECJAVA command at the end of file (if-else nested). I personally write this line as first statement of this batch