me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

How to detect which class or line is causing the memory leak? #222

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How to detect which class or line is causing the memory leak?

Guide me how to track memory leakages using this monitoring tool.

Original issue reported on code.google.com by kannadha...@gmail.com on 28 May 2012 at 3:23

GoogleCodeExporter commented 9 years ago
At times, the JVM ran out of memory and server is shutting down automatically, 
where do we need to look into Javamelody tool to identify the root cause?

Original comment by kannadha...@gmail.com on 28 May 2012 at 3:29

GoogleCodeExporter commented 9 years ago
You can look at the memory histogram (the link is in the "System information" 
part of the monitoring report).

Or you can generate a heap dump (the link is also in the "System information" 
part), and then open the heap dump file with Eclipse MAT for example.

Original comment by evernat@free.fr on 28 May 2012 at 4:02

GoogleCodeExporter commented 9 years ago
You can see a memory histogram in the demo:
http://demo.javamelody.cloudbees.net/monitoring?part=heaphisto

Original comment by evernat@free.fr on 28 May 2012 at 4:03

GoogleCodeExporter commented 9 years ago
Thanks for the inputs. I generated Heap Dump and loaded the same in Eclipse MAT 
and looked into Leak suspects. I was able to figure out now. But most of the 
Leaks are from JAVA packages Map / ArrayList or inbuilt classes. If we want to 
really figure out from which of our package or classes this map / arraylist 
created the issue, where and how to proceed? Need your help hardly.

Original comment by kannadha...@gmail.com on 30 May 2012 at 3:09

GoogleCodeExporter commented 9 years ago
Eclipse MAT documentation and blogs and / or Google are your friend to fix 
memory leaks. And what I know is that Eclipse MAT is great to find references.

This issue does not depend any more on javamelody, so closing it.
Hope the best for you.

Original comment by evernat@free.fr on 30 May 2012 at 4:50