Skip to content

2026-11-12: emilia-container-agent evicted for memory on worker-3, one agent run lost

Kind: reference (incident report)

Severity: warning · Status: mitigated (the replacement pod was Ready 14 seconds after the eviction; the cause, agent runs that outgrow their memory request on full workers, stays open in #2407) · Resolved by: operator agent · Duration: 0:00 from detection to mitigation: the replacement was Ready at 14:10:56 UTC, before the alert fired at 14:16:03 · Taskbase task: #2884

Summary

At 14:10:42 UTC the kubelet on worker-3 evicted emilia-container-agent-7bbb6cc7d4-c2mcd under its soft memory threshold (2Gi, #2543). The runner container was using 3283260Ki (3.13 GiB) against a 1536Mi request, and it was the only pod on worker-3 above its request, so the kubelet chose it. The run it was working was killed. The Deployment's replacement started on worker-2 and was Ready 14 seconds later. The eviction was the soft-eviction net working as designed: worker-3's available memory fell by about 1.9 GiB in a minute, and the net stopped it before the node stalled. No change was made. The runbook's fix for memory, raising the request, does not fit the workers today (#2407).

Impact

  • Services: the emilia-container-agent runner (organizations 8 and 10) was down for about 14 seconds. Nothing else on worker-3 was evicted or restarted.
  • Users: the agent run in progress on that runner ended without a result. Taskbase records it as a failed or lost run, and attention triage handles it.
  • Data: none. The pod holds no persistent data; its runner state is rebuilt on start.
  • Duration: fault 14:10:42–14:10:56. The alert fired at 14:16:03 (five minutes later, by design) and keeps firing until 6 hours after the eviction, whatever the cause.

Timeline

All times UTC.

Time Event Source
11-07 14:27:03 emilia-container-agent-7bbb6cc7d4-c2mcd started on worker-3 pod status.startTime
11-11 12:11:14 Its runner container was OOMKilled at the 4Gi limit (exit 137) and restarted pod lastState.terminated
14:09:20–14:10:20 worker-3 MemAvailable fell from 3453 MiB to 2494 MiB, then to 1599 MiB Prometheus node_memory_MemAvailable_bytes
14:10:42 Evicted: "The node was low on resource: memory. Threshold quantity: 2Gi, available: 1685860Ki. Container runner was using 3283260Ki, request is 1536Mi, has larger consumption of memory." event Evicted
14:10:53 ReplicaSet created emilia-container-agent-7bbb6cc7d4-4j4sv, scheduled on worker-2 event SuccessfulCreate
14:10:56 Replacement Ready pod condition Ready
14:11:20 worker-3 MemAvailable back at 4078 MiB Prometheus
14:16:03 Detected: PodEvicted (warning) fired Alertmanager
14:17:03 Incident task #2884 created Taskbase
~14:18–14:25 operator agent checked the alert, the pod, the node and the memory history, read-only this report

Root cause

Agent runs now use far more memory than the container agents request while working. #1814 sized emilia's active request (1536Mi) on runs with p95 1071Mi, p99 1398Mi and a peak of 1789Mi. Measured on 2026-11-12, counting only the runner's working set samples above 600Mi (active):

p50 p95 p99 Peak
emilia, 7 days (1m steps) 1009Mi 2094Mi 2716Mi 3206Mi
emilia, 30 days (5m steps) — 2734Mi 3340Mi 3386Mi
miki (7dd5555c4f-hzs5n), 7 days 871Mi 1899Mi 2470Mi 2954Mi

The runner was also OOMKilled at its 4Gi limit three times in those 7 days (emilia 595985b45b-9b5zh and 7bbb6cc7d4-c2mcd, miki 85765999d-8mtcc).

The scheduler places a container agent by its idle request (512Mi). The resizer grows it in place during a run (Idle and active size), and the run can use up to the 4Gi limit whatever it requests. When a run on worker-3 grew to 3.13 GiB, the node's available memory went below the kubelet's soft threshold of 2Gi for its 10 s grace. The kubelet ranks pods above their request first, then by priority, then by how far they are over. At 14:10:50 emilia's runner pod was the only pod on worker-3 above its request (+1647 MiB), so it was evicted, as hetzner-mgmt worker memory eviction expects for about one eviction in six.

The runbook's roll-forward for memory is to raise the request (PodEvicted). That does not work here. Memory requested at 14:2x was 5692Mi on worker-1 (78 %), 6704Mi on worker-2 (92 %) and 5552Mi on worker-3 (76 %), each of about 7245Mi allocatable, so a grow much beyond the present 1536Mi would be Deferred. While a grow is deferred, the run keeps its 512Mi idle request and is even further over it. A request that covered the measured p99 (about 2.75Gi) would not fit in place on any worker. Even #2407's proposed 2Gi would have left emilia over its request at 3.13 GiB.

What the agent did

All commands were read-only and named --context admin@mgmt-cluster. Nothing in the cluster was changed.

  1. kubectl get --raw "$AM/api/v2/alerts" through the Alertmanager Service proxy (Read Alertmanager and Prometheus on a cluster): PodEvicted 990e6d7b7cf0a6bf was active and not silenced, and every alert's cluster label was hetzner-mgmt. The other firing warning, NodeHighMemoryUsage, is on the control plane (10.0.0.10) and unrelated.
  2. Following the PodEvicted read-only checks:
  3. kubectl -n agent-runners get pod emilia-container-agent-7bbb6cc7d4-c2mcd -o jsonpath='{.status.message}' returned the memory message above. The node was worker-3.
  4. kubectl describe node worker-3 showed MemoryPressure False since 14:15:51 and memory requests of 5552Mi (76 %).
  5. kubectl -n agent-runners get pods -o wide showed the replacement …-4j4sv Running 3/3 on worker-2.
  6. kubectl get pods -A --field-selector=status.phase=Failed listed this pod and eleven evicted gitea-act-runner pods (dind over its 2Gi request; those raise the info alert CIRunnerMemoryEvicted).
  7. Prometheus through the Service proxy:
  8. sum by (node, eviction_signal) (increase(kubelet_evictions[24h])) returned worker-3 memory.available 9 and worker-1 1. That is under NodeMemoryEvictionsFrequent's 10.
  9. At 14:10:50, pods on worker-3 whose working set was above their memory request: only this pod, +1647 MiB.
  10. Working-set quantiles and the OOMKilled reasons in Root cause.
  11. Memory requested per worker (kubectl describe node worker-1|2|3).
  12. Did not raise the request (it does not fit, see Root cause), did not change the 4Gi limit (a higher limit lets a run take more of an 8 GB node before the net acts), and did not delete the evicted Pod object. The runbook allows deleting it only once the cause is fixed, and deleting it would also end the alert early.
  13. Appended these measurements to #2407 and created the runbook follow-up #2885.
  14. This report, and one line in cluster-runners saying that the kubelet's soft eviction now acts before Talos's OOM controller.

Resolution and verification

  • kubectl -n agent-runners get pods: emilia-container-agent-7bbb6cc7d4-4j4sv Running 3/3, Ready since 14:10:56. list_runners in Taskbase shows emilia-container-agent online and idle.
  • kubectl describe node worker-3: MemoryPressure False. Prometheus: worker-3 MemAvailable 4078 MiB at 14:11:20.
  • PodEvicted keeps firing until about 20:10, 6 hours after the eviction. That is the rule's window, not an open fault.

Follow-ups

  • 2407: container agents' working memory request. It now holds the 2026-11-12 measurements and the

    finding that a larger request does not fit in place, so it is a capacity choice: larger workers, fewer platform requests, or accepting that runs above about 2–3 GiB are evicted.
  • 2885: the PodEvicted runbook should say how to handle a container agent evicted for memory whose

    larger request cannot fit.
  • 2680 (pod placement re-check): the replacement landed on worker-2, which emilia's overlay prefers

    to avoid. worker-2 is at 92 % requested, so emilia's next grow to 1536Mi there will be Deferred.

References

Open questions

  • Which task's run was killed. The runner's logs were gone with its containers, and list_runners showed the runner idle by the time of the check.
  • What made runs use more memory since #1814's sizing (2026-10-27): the work in the tasks, the model, or the runner image (v0.5.31 now).