Capture Heap dump from Tomcat Windows Service

Add the following options into Tomcat >> Java >> Java Options

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8086
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

  • Goto JAVA_HOME/bin directory and launch jconsole.exe application
  • In the remote process box enter localhost:8086 and click Connect button
  • Switch to the MBeans tab
  • select com.sun.management – HotSpotDiagnostic – Operations – dumpHeap in the tree on the left
  • Pressing the dumpHeap button creates the heap dump. The parameter called p0 allows you to specify into which target file the heap is dumped.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: