14 Jul 2025
05:49 PM
- last edited on
22 Jul 2025
02:30 PM
by
AgataWlodarczyk
Hi,
We believe we've stumbled on a memory leak caused by the Dynatrace default interceptor.
We observed applications mysteriously restarting due to OOMs. Upon further investigation (jemalloc tuning), it was revealed that the native memory allocator from the Dynatrace native lib was hoarding twice our heap in memory.
Here's a picture of the relevant allocation stack showing this.
And because I'm sure it's useful, here's the one agent version information in a copy/pasteable form
/opt/dynatrace/oneagent-paas/agent/bin/1.315.68.20250627-182234/linux-x86-64/liboneagentjava.so
We've observed that switching to a non-OkHttpClient client fixes this problem.
Here's another shot of one of the paths taken
It appears that memory allocated by `CorrelationNative` isn't being properly (or timely) released for the OkHttp integration.
Solved! Go to Solution.
22 Jul 2025 02:30 PM - edited 22 Jul 2025 02:31 PM
@tmay Thank you very much for providing the feedback and solution!