Does New Relic's Java agent guarantee heap dump capture when memory usage exceeds the configured threshold in a Kubernetes pod with restricted capabilities?
0 reputation · 24 Dec 2024, 13:41 UTC
Determine whether New Relic's Java agent guarantees heap dump capture whenever the configured memory‑usage threshold is exceeded, especially when the JVM runs inside a Kubernetes pod with limited Linux capabilities.
The agent’s automatic heap dump is described as a best‑effort feature that relies on HotSpot diagnostic commands (jmap/jcmd) and requires the process to have SYS_PTRACE or run as a privileged user. In restricted containers these commands may fail, causing the agent to skip dump generation without reporting an error. Additionally, the threshold‑based trigger can miss short‑lived or sub‑threshold leaks, and misconfiguration can suppress useful dumps.
Does the agent log a failure when it cannot execute the heap‑dump command due to missing capabilities? If a dump is not generated, does the agent send any alternative memory‑diagnostic data to New Relic? Are there any retry or fallback mechanisms that the agent employs when the initial trigger fails?