Troubleshoot Memory Leaks

After detecting a potential memory leak, troubleshooting the leak involves performing these three actions:

Select the Collection Object to Monitor

On the Automatic Leak Detection dashboard, right-click the class name and click Drill Down.

For performance reasons, start the troubleshooting session on a single collection object at a time.

Use Content Inspection

Content Inspection identifies which part of the application the collection belongs to so that you can start troubleshooting. It allows monitoring histograms of all the elements in a particular collection.

Enable Automatic Leak Detection by starting an On Demand Capture Session, select the object you want to troubleshoot, and then follow the steps listed below:

  1. Click the Content Inspection tab.
  2. Click Start Content Summary Capture Session to start the content inspection session.
  3. Enter the session duration. Allow at least 1 – 2 minutes for data generation.
  4. Click Refresh to retrieve the session data.
  5. Click on the snapshot to view details about an individual session.

Use Access Tracking to view the actual code paths and business transactions accessing the collections object.

As described above in Workflow to Troubleshoot Memory Leaks, enable Automatic Leak Detection, start an On Demand Capture Session, select the object you want to troubleshoot, and then follow the steps listed below:

  1. Select the Access Tracking tab
  2. Click Start Access Tracking Session to start the tracking session.
  3. Enter the session duration. Allow at least 1-2 minutes for data generation.
  4. Click Refresh to retrieve session data.
  5. Click the snapshot to view details about an individual session.
The troubleshooting information pane shows the Java stack trace associated with the session. By default, the stack trace is shown to a depth of 10 lines. If you would like to temporarily increase the number of lines captures, you can use the maximum-activity-trace-stack-depthIncreasing the stack trace depth can consume a significant amount of system resources. You must remove the property or set it back to the default value of 10 after you have captured the desired information. See App Agent Node Properties Reference.