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
Look where you are setting it, use echo [statements]
to troubleshoot, try setting it right before its passed to the VM, something like:
set CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
-Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
Make sure you have the right EXEC_JAVA
not sure which version of the .bat
file you have, but probably several if
statements.
Also make sure these are valid arguments for your VM.
You can check your max heap size within your java code, use:
long heapMaxSize = Runtime.getRuntime().maxMemory();
Just print it out, if its correct based on your settings, you have a bad memory leak, if its not, then tomcat
is not picking it up.