This page describes how to view the Automatic Memory Leak dashboard and enable automatic leak detection. See Java Memory Leaks.

JVM Requirements

  • Oracle JVM >= 1.5
  • JRockit JVM >= 1.5 
  • IBM JVM >= 1.6

Automatic Memory Leak Dashboard

The Automatic Memory Leak dashboard shows:

  • Collection Size: The number of elements in a collection.
  • Potentially Leaking: Potentially leaking collections are marked as red. You should start diagnostic sessions on potentially leaking objects.
  • Status: Indicates if a diagnostic session has been started on an object.
  • Collection Size Trend: A positive and steep growth slope indicates a potential memory leak. 

To identify long-lived collections, compare the JVM start time and Object Creation Time.

You must have the Configure Agent Properties permission to activate or deactivate automatic leak detection. See Manage Custom Roles for Cisco AppDynamics.

Enable Automatic Leak Detection

  1. In the left navigation pane, click Tiers & Nodes
  2. In the right pane, expand the tier of the node you want to configure. 
  3. Select the node and click View Dashboard
  4. Click Memory > Automatic Leak Detection.

  5. Click On
  6. Click Start On Demand Capture Session to detect leaking collections.

Test before implementing

Leak Detection may affect performance, so test this functionality in a preproduction environment or on a single node first.

AppDynamics begins to automatically track the top 20 application classes and the top 20 system (core Java) classes in the heap. 

Troubleshoot Leak Detection

If you cannot see any captured collections, ensure that you have the correct configuration for detecting potential memory leaks. As described in the on-screen instructions you may need to lower the minimum collection size from the default, 5 MB:

To configure the agent of a specific node to capture smaller collections:

  1. On the Tiers & Nodes list, expand a tier and double-click the node you want to configure.
  2. Ensure the App Server Agent tab is active and click Configure.  
  3. Select the Application, Tier, and Node and then click Use Custom Configuration.
  4. Search for minimum-size-for-evaluation-in-mb in the node properties list. Set the value to a smaller size. 
  5. Choose to overwrite the node configuration.