Sample Code - Using DMS Event Tracing to Identify the Cause of a Memory Leak Within a WebLogic Managed Server
(Doc ID 1444915.1)
Last updated on JUNE 30, 2023
Applies to:
Oracle Fusion Middleware - Version 11.1.1.4.0 to 11.1.1.6.0 [Release Oracle11g] Information in this document applies to any platform.
Purpose
The purpose of this document is to help troubleshooting memory leaks in the AdminServer or Managed Servers where the Heap Dump Analysis show the biggest objects in the heap are DMS objects.
DMS java objects are created automatically when certain operations are performed. For example, each JDBC Connection creates DMS Nouns and Sensors at runtime as well as MetricMBeans for the Nouns. When the connection is closed, the DMS objects are explicitly destroyed. If the software in the stack does not called close on the connection, then the DMS Nouns and MetricMBeans accumulates resulting in what appears to be memory leak in DMS causing OutOfMemory (OOM) condition for the managed server.
The root cause is often the calling software/component and not DMS. This note introduces DMS Event Tracing debugging options to print the calling component stack.
Event Tracing will help to identify the offending component, as the heap dump shows the object instances but does not tell us exactly who has created it. In most cases once identified the offending component a SR/bug should be filed against that component.
The following excerpts are examples of what appears to be a memory leak in DMS using the report from the 3rd Party Java Memory Analyzer Tool (MAT) memory leak detector:
Troubleshooting Steps
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!