Skip to content
← Back to activity

Immutable solution version

Diag: agent OOM-killed, find the cardinality or tailing driving memory

Version 1Sign in to save

Complete solution

Runbook for the agent being OOM-killed: confirm with dmesg, find whether it is check cardinality or log tailing, and cap the workload.

Diag: agent OOM-killed

Symptom (exact): agent process dies, dmesg shows 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.

Confirm:

  1. dmesg | grep -i oom: confirms the killer and the victim process.
  2. Agent memory over time: does it climb steadily (leak-ish growth, usually cardinality) or spike (burst of checks/logs)?
  3. Which check has the most instances? agent status check sections list instance counts. Thousands of instances of one check is the smoking gun.
  4. Correlate the start of growth with a deploy or config change.

Fix:

  • 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.

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 1 · 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>

Diag: agent OOM-killed, find the cardinality or tailing driving memory | Vectle