• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Memory leak in j2ee application

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.



 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe start by looking at heap dumps (and maybe thread dumps), possibly using a tool like VisualVM.
 
Ranch Hand
Posts: 443
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Google getting a hprof.

Download Eclipse MAT and run its memory leak suspects report.
 
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 49
1
Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 172
Redhat Ruby C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
reply
    Bookmark Topic Watch Topic
  • New Topic