Re: Memory Leak Issue in Weblogic, SUN, Apache and Oracle classes
On 05/28/2010 10:14 AM,
What makes you think those well-established products are responsible
for the leaks and not the application code?
By convention we cite the author of a quoted Usenet post and set the quoted
material off with various depths of consecutive right-angle-bracket ('>')
Amit Jain wrote:
:) yes you are right. How can we identify fault in our Application
code. Histogram is showing classes of Apache, BEA and Oracle.
Histogram from where?
Servers like WebSphere Application Server have options to help track memory
leaks, like Tivoli ITCAM.
We penurious students of the art need less expensive alternatives. The
"-verbose:gc" option to the JVM might help, as might the Java Console.
There are several standard tools for troubleshooting memory usage, starting
with "-verbose:gc", jhat and jmap through JConsole and on to Java VisualVM
which last, alas for you, only came out full time with Java 6. You might be
able to use it under Java 6 to debug your Java 5 program, though.
Most of the available tools require deciphering and interpreting log files. See
and following paragraphs.
Does that obsolete version of Java support perm-gen sweeping for GC?
Amit Jain wrote:
could you please us more view on this point...
There is an option to the Sun JVM, "-XX:+CMSClassUnloadingEnabled", that
allows GC to unload unused classes after a while, and another,
"-XX:+CMSPermGenSweepingEnabled", that allows GC to clean up the permanent
To assist your analysis, "-XX:PermSize=??m XX:MaxPermSize=???m" let you
control the size of the permanent generation. I run NetBeans with a
"MaxPermSize 0m", and with all it controls, including Tomcat, that seems to
work so far.
I don't know if these options are available with Java 5 either, but you can
run your Java 5 apps on a Java 6 JVM and use these tools to help you diagnose