0

I am running Tomcat-6.0.32 on the RHEL 5.4 with JDK-1.6.0_23 version. I am running almost more than 15 applications. Applications are small applications only. My RAM is 8GB and swap is 12GB. I set the heap size from 512Mb to 4GB.

The issue is after a few hours or days of running, the tomcat is not providing service though it is up and running. While I could see the catalina.out log file, it is showing memory leak problem.

Now, my concern is I need to show a solution to that issue or at least I need to highlight the application which is causing the memory leaks.

Could anyone explain how I can discover which application is causing the memory leak issue?

trincot
  • 263,463
  • 30
  • 215
  • 251
Shashikanth Komandoor
  • 771
  • 1
  • 11
  • 29

2 Answers2

1

One option is to use heap dumps (see How to get a thread and heap dump of a Java process on Windows that's not running in a console) and analyze heap dump later on.

Or another option is to analyse process directly using tools like jmap, VisualVM and similar.

Community
  • 1
  • 1
JiriS
  • 6,081
  • 4
  • 29
  • 40
0

You may use the combination of jmap/jhat tools (Both these are unsupported as of Java 8) to gather the heap dump (using mmap) and identify the top objects in heap (using jhat). Try to co-relate these objects with the application and identify the rogue one.

Balaji Katika
  • 2,725
  • 2
  • 17
  • 19