Skip to content

fix(k8s): alloy-profiles is OOMKilled on the busiest node and restarts every few minutes #1815

Closed

Description

@dan-petty

One pod of the alloy-profiles DaemonSet (monitoring namespace) is OOMKilled over and over: the alloy container had 31 restarts in 148 minutes, and the pod sits at 1/2 Ready in CrashLoopBackOff. The other two pods of the DaemonSet, on the other nodes, have run without a restart for the same 148 minutes.

Evidence

  • The container's memory limit is 512Mi (alloy-profiles.alloy.resources in k8s/monitoring/k8s-monitoring-values.yaml); its last state is OOMKilled, exit code 137.
  • The healthy pods hold 205 to 215Mi. The crashing one, on the node that runs the most pods (13, with another node), was at 286Mi and 275m CPU a few minutes after its restart, and climbs to the limit before it is killed.
  • The profiler targets every pod on the node (profiling.ebpf.targetingScheme: all), so its memory follows how many processes the node runs and the symbol tables of their binaries.
  • Its log before each kill also shows Failed to load /bin/prometheus ...: unsupported Go version go1.27.1 (need >= 1.13 and <= 1.26): the eBPF profiler cannot unwind that binary, which Prometheus runs on every node.

Proposed remedy

Raise alloy-profiles.alloy.resources.limits.memory to a value measured on the busiest node (kubectl top of the pod over a day), or narrow what the profiler targets from all to the namespaces and annotated pods whose profiles are read. Say in the values why the limit is what it is. The Prometheus Go-version message needs an Alloy release whose profiler supports Go 1.27; until then it only costs that one binary's profile.

Activity

  1. added
    type/bug
    scope/k8s
    priority/p2-medium
    source/agent
    on Oct 21, 2026
  2. added this to the v0.2.39 milestone on Oct 21, 2026
  3. added
    status/in-progress
    on Oct 21, 2026
  4. added a commit that references this issue on Oct 22, 2026
    b40d48e
  5. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1816, merged into release/v0.2.39 as b40d48e.

    The eBPF profiler pod on the node that runs the most pods is no longer OOMKilled every few minutes.

    4 file(s) changed.

    How it was verified

    Check runs at b6c546e:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Fail-to-Pass Check: pass
    • Rule Pack Tests: pass
    • Changed-Test Independence: pass
    • Fail-to-Pass Self-Check: pass
    • Tests & Coverage: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • Static Analysis: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1815-alloy-profiles-memory.md:

    • The profiler's memory limit is 1024Mi (test_the_profiler_limit_leaves_room_above_the_spikes_that_killed_it).
    • Pending a person: after the release reaches main and Argo CD syncs k8s-monitoring, every pod of kubectl -n monitoring get pods -l app.kubernetes.io/name=alloy-profiles is 2/2 Ready with no new restarts after a day. If the pod on the busiest node still reaches 1024Mi, narrow profiling.ebpf.targetingScheme instead of raising the limit again.
  6. added a commit that references this issue on Oct 23, 2026
    f209f6c
  7. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/k8ssource/agenttype/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions