On 26.05.2010 16:38, Rainer Jung 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".

I meant "-XX:+PrintCompilation"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to