[Helma-user] Helma OutOfMemory
Michael Platzer
michael.platzer at knallgrau.at
Tue Mar 27 14:24:46 CEST 2007
Hi list,
From time to time a helma developer might find herself in the situation
[1], where an application runs out of memory (and therefore crashes) and
she has no clue what causes that memory leak. Hannes recently gave me
the decisive hint to look for 'memory profilers for Java' [2] (in
particular: YourKit [3]), if one happens to be in such a situation.
By adding '-XX:+HeapDumpOnOutOfMemoryError' to the Java start options,
the JVM will save the complete memory content on to the disk the next
time that an OutOfMemory-error occurs. A tool like YourKit now allows
you to open the dumped file, and lets you sort all loaded classes by
their size. That way you should be able to quickly identify the classes,
resp. the code that led to the memory leak. At least in our case, it was
that easy.
Just thought this information might be worth sharing,
michi
[1] http://www.google.at/search?q=+site:helma.org+helma+outofmemory
[2] http://www.google.at/search?q=memory+java+profiling
[3] http://www.yourkit.com/
More information about the Helma-user
mailing list