Skip to content

Troubleshooting Out Of Memory Errors in Weblogic using Eclipse Memory Ananlyser

Eclipse Memory Ananlyser is a very useful tool to analyze heap dumps. It has a lot of features such as Memory Leak detection where it runs an automated test to determine the suspected leaks.

HereĀ is the Procedure

Step 1). Start the Weblogic Server, with the application in active state which causes memory leak.

Step 2). Get the process id of the server using jps


Step 3). Acess the application that causes memory leak

Step 4).Take heap dump at regular interval using jmap.

jmap -dump:format=b,file=dump1.bin 5004

Step 5).Open the Heap Dump in Eclipse Memory Ananlyzer (U can download it from http://www.eclipse.org/mat/downloads.php) Approximate size is 42 MB..Just u need to extract this Zip then u can directly start (no Installation needed)

Observe the heap usage of Objects in the heap dumps. If the object instance keeps on increasing in the subequent heap dumps, force a garbage collection from the Weblogic Server console


Take heap dumps again and open in the Eclipse Memory Analyzer. If the number of instances still don’t go down for those objects, you can expect to see this

<Jul 16, 2010 10:49:15 AM IST> <Critical> <Health> <BEA-310003> <Free memory in
the server is 47,856 bytes. There is danger of OutOfMemoryError>
Exception in thread “Thread-12″ java.lang.OutOfMemoryError: Java heap space
at demo.MemoryLeakTest.runTest(MemoryLeakTest.java:14)
at jsp_servlet.__memoryleak$1.run(__memoryleak.java:86)
at java.lang.Thread.run(Thread.java:619)

.

If the leak is happening due to a Weblogic Class, it can be a known issue or an undiscovered BUG. You need to get in touch with Oracle Support. If it’s an Application Class, you need to contact the developers. Out of Memory can also happen dude to third party codes such as database drivers.

16 Comments

  1. Hi Faisal, It is great work!!
    This blog is pretty much helpful for WebLogic Administrators. The way you wrote it is really cool!! one of the wonder!!

    Expecting more wonders from your team…
    Keep doing good work… I mean wonders

    Posted on 19-Jul-10 at 10:29 pm | Permalink
  2. admin

    thanks Mate :)

    Posted on 20-Jul-10 at 7:19 am | Permalink
  3. Ramesh

    You’re my hero! Thanks. Very, very helpful.

    Posted on 11-Jan-11 at 2:52 am | Permalink
  4. Administrator

    Thanks for your appreciation Ramesh!! :)

    Posted on 11-Jan-11 at 8:30 am | Permalink
  5. srinivas

    it’s very helpful to us……….. thanks a lot mate

    Posted on 18-Jan-11 at 7:57 am | Permalink
  6. Administrator

    Thanks Srinivas!

    Posted on 21-Jan-11 at 5:23 pm | Permalink
  7. smitha

    Hi,

    After Analysing heap dump

    weblogic.JMS.frontend.FEConsumer class consuming more than 1GB.why this happens.mine is 9.2MP3

    Posted on 24-Apr-11 at 11:56 am | Permalink
  8. Administrator

    Hi Smitha,

    This can be a bug in the application/application server code.

    Can you develop a simple test case to reproduce this issue?

    Thanks,
    Faisal

    Posted on 25-Apr-11 at 8:59 am | Permalink
  9. Yatan

    Hi’

    I have downloaded the eclipse memory analyzer from the location provided however when I click on the MemoryAnalyzer.exe, its is not starting the eclipse. Can you advice me, I am using Win XP.

    Thanks
    Yatan

    Posted on 14-Jun-11 at 1:34 am | Permalink
  10. Administrator

    Hi Yatan,

    What is the error you are getting?
    Can you share screenshots?

    Cheers!
    Faisal

    Posted on 30-Jun-11 at 7:42 am | Permalink
  11. fabian dsouza

    Hi,
    Good Article,was very very useful for me.

    I followed the above steps for leak Suspects,it showed me the below Problem Suspect 1

    One instance of “weblogic.jdbc.common.internal.GenericConnectionPool” loaded by “sun.misc.Launcher$AppClassLoader @ 0x866ba340″ occupies 335,917,304 (90.26%) bytes. The memory is accumulated in one instance of “java.util.LinkedList$Entry” loaded by “”.

    Keywords
    weblogic.jdbc.common.internal.GenericConnectionPool
    sun.misc.Launcher$AppClassLoader @ 0x866ba340
    java.util.LinkedList$Entry

    Can you please tell how can i suspect which page is creating a page leak.

    Regards
    Fabian

    Posted on 20-Sep-11 at 5:22 am | Permalink
  12. Administrator

    Take multiple heap dumps and see if the count of those objects are increasing or not.. also force the garbage collection from the admin console and take heap dump after that. If those objects are still in the heap then determine if the application is using those objects… hope this helps..

    Posted on 27-Sep-11 at 6:30 am | Permalink
  13. Afzal

    Thanks for sharing the information may i know how to handle the performance related issues

    Posted on 09-Nov-11 at 9:57 pm | Permalink
  14. Administrator

    Thanks Pasha.

    We will try to post an article on performance related issues.

    Posted on 29-Nov-11 at 6:19 am | Permalink
  15. brahmaiah

    Thank You Administrator Your article are very helpful

    Posted on 02-Dec-11 at 2:03 am | Permalink
  16. anandraj

    Thanks, you feedback is invaluable for us.

    Regards,
    Wonders Team.:-)

    Posted on 06-Dec-11 at 12:45 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*