aspose file tools
The moose likes Struts and the fly likes To find out memory leaks in struts application  Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "To find out memory leaks in struts application  " Watch "To find out memory leaks in struts application  " New topic
Author

To find out memory leaks in struts application

Abhi Singh
Greenhorn

Joined: Feb 02, 2010
Posts: 13
Sometimes I am getting OutOfMemory error when running my projects for multiple users.I am using jdk 1.6,netbeans 6.0. Can anyone suggest how to find out the memory leaks or to overcome this error. As I am using jdk 1.6, it takes the size of the heap automatically according to the operating System.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You could use a code profiler, but so far it sounds like it'd be easier to just look at the stack trace to see when the OOM occurs--without any further information it sounds like you're just doing something that's eating all the memory.
Abhi Singh
Greenhorn

Joined: Feb 02, 2010
Posts: 13
Thank you David for your suggestion. I have used profiler to get those results but I am not getting the actual point where the leakage occurs. Still i will try. Anyways thanks for your suggestion
walter wang
Ranch Hand

Joined: Jun 02, 2001
Posts: 144
using PrintClassHistogram as VM parameter, and dumping several memory snapshots at different time to GC.log file,

By analyzing incensement of number and size of objects, you could find the root cause.


public class Walter{
public boolean is_Working_Now(boolean is_boss_Coming){
return is_boss_Coming;
}
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8265

JavaRanch FAQ: InvestigateOutOfMemoryError


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: To find out memory leaks in struts application
 
Similar Threads
Out of Memory with high Free Memory
memory leaks
How to find memory leaks ?
Using MAp Problem
NullPointerException while establishing the JBOSS