Memory Leak - Weblogic Server

Hi everyone,

I am facing an issue on a WebLogic server running Java 8 with the latest version of the APM agent installed.

The JVM has been experiencing a memory leak problem after two days of use without a reset. After analyzing the heap dump, it was identified that the issue is coming from the APM agent.

Previously, we were using version 1.45, which also presented the same behavior.

Has anyone encountered the same issue?

Thank you.


Leak Suspects

One instance of **co.elastic.apm.agent.collections.NullSafeWeakConcurrentMap** loaded by **co.elastic.apm.agent.premain.ShadedClassLoader @ 0x4c0a2aae0** occupies **4.338.513.712 (52,27%)** bytes. The memory is accumulated in one instance of **java.util.concurrent.ConcurrentHashMap$Node[]**, loaded by **<system class loader>**, which occupies **4.338.513.504 (52,27%)** bytes.

Thread **java.lang.Thread @ 0x4c06b7b98 elastic-apm-sampling-profiler** has a local variable or reference to **co.elastic.apm.agent.premain.ShadedClassLoader @ 0x4c0a2aae0** which is on the shortest path to **java.util.concurrent.ConcurrentHashMap$Node[1048576] @ 0x66cc00000**. The thread **java.lang.Thread @ 0x4c06b7b98 elastic-apm-sampling-profiler** keeps local variables with total size **496 (0,00%)** bytes.

The stacktrace of this Thread is available. [See stacktrace](file:///C:/Users/Cadu/AppData/Local/Temp/report5898811425711456391/pages/25.html). [See stacktrace with involved local variables](file:///C:/Users/Cadu/AppData/Local/Temp/report5898811425711456391/pages/26.html).

**Keywords**

* co.elastic.apm.agent.collections.NullSafeWeakConcurrentMap
* co.elastic.apm.agent.premain.ShadedClassLoader
* java.util.concurrent.ConcurrentHashMap$Node[]```