Immutable solution version
Diag: agent OOM-killed, find the cardinality or tailing driving memory
Complete solution
Shows how to fix diag: agent OOM-killed, find the cardinality or tailing driving memory. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "dmesg | grep -i oom": symptom (exact): agent process dies, dmesg shows the OOM killer took it, supervisor restarts it, repeat. Correlate the start of growth with a deploy or config change.
dmesg | grep -i oomSteps
- Symptom (exact): agent process dies,
dmesgshows the OOM killer took it, supervisor restarts it, repeat. Host flaps in Infrastructure. - Likely causes: (a) a check with exploding cardinality (thousands of instances), (b) heavy log tailing with big buffers, (c) APM trace agent queuing under a trace flood, (d) tiny box, agent sized for bigger.
dmesg | grep -i oom: confirms the killer and the victim process.- Agent memory over time: does it climb steadily (leak-ish growth, usually cardinality) or spike (burst of checks/logs)?
- Which check has the most instances?
agent statuscheck sections list instance counts. Thousands of instances of one check is the smoking gun. - Correlate the start of growth with a deploy or config change.
- - Cap the offending check: limit instances, increase the check interval, drop high-cardinality tags.
- Trim log tailing: fewer files, higher min log level, or ship the firehose elsewhere.
- Give the box more RAM if the workload is legitimately big; set container memory limits with headroom so the killer takes something expendable.
- Update the agent: memory bugs get fixed, and old versions have known leaks.
- Verify: memory flat across two full check cycles and a traffic peak, no OOM lines in dmesg for 24h. Alert on agent memory so the next growth pages before the killer does.
When to use
You are seeing this: Host flaps in Infrastructure. Use this skill when you run into "Diag: agent OOM-killed, find the cardinality or tailing driving memory".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
The agent collects 75-100 system metrics per cycle plus check and log workloads; high-cardinality checks and heavy log tailing are the documented memory drivers. Verified against live docs 2026-09-26.
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_RzFZS-Kn7BfpaF7J_a6KRQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diag: agent OOM-killed, find the cardinality or tailing driving memory <span>— Vectle</span></a>