Hello Jung, Thanks for your insights. Learning some new stuff about Java every day ;) I've read this nice blog - http://www.talkingtree.com/blog/index.cfm/2006/4/28/Understanding-HotSpot-in-Plain-English ( UNDERSTANDING HOTSPOT IN PLAIN ENGLISH<http://www.talkingtree.com/blog/index.cfm/2006/4/28/Understanding-HotSpot-in-Plain-English> )
Now I can see how to avoid those HotSpot compilation errors and eventual JVM crashes. I could use -Xint option to force "interpretedmode execution only" like this: # cat /srv/tomcat/bin/setenv.sh export JAVA_HOME=/srv/jdk export PATH="${PATH}:${JAVA_HOME}/bin/" CATALINA_OPTS="-Xint -Xms512m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS -Djava.awt.headless=true " What are you saying? Am I right? Best Regards, Leon Kolchinsky On Thu, May 27, 2010 at 00:38, Rainer Jung <rainer.j...@kippdata.de> wrote: > On 26.05.2010 14:49, Caldarale, Charles R wrote: > >> From: Leon Kolchinsky [mailto:lkolc...@gmail.com] >>> Subject: Tomcat died on "java.lang.OutOfMemoryError: requested >>> 2147483664 bytes for Chunk::new. Out of swap space?" message >>> >>> Yesterday I've got this error in catalina.out and Tomcat died (I'm >>> attaching hs_err_pid5460.log file): >>> >> >> This is not a Tomcat error - it's a bug in the JVM. The C2 (server) >> compiler is requesting an extremely large expansion of the C (not Java) >> heap. You can try increasing the swap space to see if that's a viable >> workaround, but you really should do this: >> >> # If you would like to submit a bug report, please visit: >>> # http://java.sun.com/webapps/bugreport/crash.jsp >>> >> >> The current JVM version is 6u20, so you might want to try running with >> that before filing a bug report or expanding the swap file. >> > > If we stick to the theory, that it is actually the Hot Spot compiler, which > demands the memory, one could also try to work around the issue. > > Option 1: Use the client Hot Sopt compiler (Add "-client" when starting the > JVM). It could help, > > Option 2: Disable the Hot Spot compilation for the class and method that > resulted in the crash: > > Current CompileTask: >> C2:4743 ! >> org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/parser/node/Node;)Z >> (514 bytes) >> > > To do this, you need to create a file named ".hotspot_compiler" in the > working directory of your Tomcat. You would put a line like that into the > file: > > exclude org/apache/velocity/runtime/directive/Foreach render > > Some more info about that is contained in > > > http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/crashes.html#gbyzd > > An alternative is adding > -XX:CompileCommand=exclude,org/apache/velocity/runtime/directive/Foreach,render > > to the command line. > > See also > > http://forums.sun.com/thread.jspa?threadID=417123 > > http://blogs.sun.com/javawithjiva/entry/hotspotrc_and_hotspot_compiler > > If you want to follow the Hot Spot compilation, you can also add > "-XX:-PrintCompilation". > > Regards, > > Rainer > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >