aspose file tools*
The moose likes Performance and the fly likes Memory leak in j2ee application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Memory leak in j2ee application" Watch "Memory leak in j2ee application" New topic
Author

Memory leak in j2ee application

shweta misra
Greenhorn

Joined: Jun 06, 2012
Posts: 10
I have to resolve a memory leak issue in a j2ee application running on weblogic application server.
Wanted some pointers on how to start working on this. what important aspects should i review.



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42584
    
  65
Maybe start by looking at heap dumps (and maybe thread dumps), possibly using a tool like VisualVM.


Ping & DNS - my free Android networking tools app
Chris Hurst
Ranch Hand

Joined: Oct 26, 2003
Posts: 418
    
    2

Google getting a hprof.

Download Eclipse MAT and run its memory leak suspects report.

"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
chandan Khatri
Greenhorn

Joined: Aug 17, 2011
Posts: 10
Hi Shweta,

As mentioned above you should start looking in to heap dumps. You can use JMeter to run scripts and get heap dumps at different intervals. This will help you analyse application memory consumption at different times.
Jprofile is also a great tool that can give you snapshots of memory upto the method level. Also run your weblogic with verbose option which provide memory statistics and you will be able to see the consumption of memory changing in logs as well.

Hope this helps you in some way .

Regards,
Chandan
Krishna Kanth
Ranch Hand

Joined: Oct 23, 2006
Posts: 49
    
    1

How do you know there is a memory leak? may be your application is not provided enough space to process all the requests it is accepting.
I would confirm there is indeed a memory leak by connecting to applicaiton from jconsole and generating average and steady traffic for 6 hours.

Or you can skip this step and go to JProfiler / HeapDump analysis straight away, but would not help unless you already know what kind of request to your app is causing memory leak.
soundar rajan
Greenhorn

Joined: May 08, 2013
Posts: 16
Another way of finding memory leaks is to enable the GC logs and analyze the same. Please find the reference for enabling and analyzing the same: http://www.tagtraum.com/gcviewer.html
Luan Cestari
Ranch Hand

Joined: Feb 07, 2010
Posts: 163

Use 'jmap' to get the heap dump and Eclipse Memory Analyzer (Eclipse MAT) to analyze the file generated (hprof). The Eclipse have some default reports, one for this case is called "Leak Report".

Regards!


Please, visit me for some cool tech post at www.ourdailycodes.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Memory leak in j2ee application