Skip to content

2026-10-20: Gitea slow, CI jobs lost without a log

Kind: reference (incident report)

Severity: critical · Status: resolved · Resolved by: a person with Claude Code, and a developer agent run for one fix (before the operator agent existed) · Duration: ~1 h 20 min from detection to resolution, 12:51–14:11 UTC · Taskbase task: #1307 (no incident task; the incident pipeline of ADR 0018 did not exist yet)

Summary

Gitea's bundled PostgreSQL ran on the Bitnami chart's nano preset (150m CPU, 192Mi). It was OOM-killed and CPU-throttled, so Gitea API calls took 3–10 s, and the Gitea Actions runners lost CI jobs that then failed after about 14 minutes with no log. Two pull requests fixed it: a longer runner fetch timeout (platform#464) and real resources for PostgreSQL and Gitea (platform#470); afterwards API calls took about 0.2 s.

Impact

  • Services: Gitea (gitea.prod.skatzi.com): every API call and page slow, 3–10 s. Gitea Actions: jobs assigned to a runner that never ran them. 19 jobs were lost (count from the person's session, recorded in task #1348).
  • Users: pull-request checks such as CI Docs Build / docs-build failed after 10–15 minutes with an empty log, and blocked merges such as platform#453 until re-run.
  • Data: none lost. The failed jobs passed when re-run.
  • Duration: ~1 h 20 min from detection (task #1307 filed, 12:51) to resolution (14:11 UTC). The fault began earlier: PostgreSQL was OOM-killed at 12:41:43, and jobs were lost the same way from 10:48 UTC (see the evidence table).

Timeline

All times UTC, 2026-10-20.

Time Event Source
10:48–12:33 Four jobs fail after 13–14 minutes with no log (tasks 9615, 9621, 9666, 9686) CI failures without a log
12:41:43 Gitea's PostgreSQL is OOM-killed task #1348, commit c36c8a2
12:51 Detected: task #1307 filed, "docs-build fails intermittently with no log" task #1307
13:00 A developer agent run on #1307 opens platform#464: fetch_timeout: 30s task #1307
13:17 platform#464 merged c744ab5
13:21 A person with Claude Code commits the PostgreSQL resources fix (platform#470) c36c8a2
14:03 platform#470 merged 2aa963c
14:11 Resolved: Gitea API calls ~0.2 s, 0 % CPU throttling task #1348

Root cause

postgresql.primary.resources was not set in components/gitea/base/helmrelease.yaml, so the Bitnami PostgreSQL chart applied its nano preset: 150m CPU and 192Mi memory. Under load PostgreSQL was OOM-killed at 12:41:43 and throttled in 73 % of CPU periods; Gitea itself was throttled in 13 % of periods at its 1 CPU limit (commit c36c8a2). Every Gitea request waited on the database.

The slow database turned into lost jobs through the runner (CI failures without a log):

  1. Gitea 1.25 assigns a job in the database first, then answers the runner's FetchTask call.
  2. act_runner waited 5 s (fetch_timeout, its default) for that answer. A slower answer counted as "no work", and the runner moved on.
  3. The job stayed running on a runner that did not know it, with no log.
  4. Gitea's zombie cleanup failed it after ZOMBIE_TASK_TIMEOUT (10 min) plus up to 5 min to the next cleanup tick.

What the agent did

The operator agent did not exist yet. A developer agent run on task #1307 did step 1; a person with Claude Code did step 2. The commands of the person's session are not in the record.

  1. platform#464 (task #1307): fetch_timeout: 5s → 30s in components/gitea/act-runner/runner-config.yaml, and the guide CI failures without a log. Because Gitea answers at once when healthy, the longer timeout costs nothing; it only stops a slow answer from losing a job.
  2. platform#470: in components/gitea/base/helmrelease.yaml, PostgreSQL gets requests 500m CPU / 512Mi and limits 2 CPU / 1Gi, and Gitea's CPU limit goes from 1 to 2. Flux rolled both out after the merge.

Resolution and verification

At 14:11, after platform#470 was live, Gitea API calls took about 0.2 s and PostgreSQL showed 0 % CPU throttling (task #1348). The exact queries used are not in the record.

Follow-ups

  • 1342 (done): the GiteaAPISlow alert, a blackbox probe of Gitea's API latency, now catches this before jobs are lost; runbook GiteaAPISlow.

  • 1336 (done): the ContainerOOMKilled alert, runbook ContainerOOMKilled.

  • Epic #66: the operator agent that will work incidents like this one.

References

Open questions

  • When did PostgreSQL start being throttled? Jobs were lost from 10:48 UTC, well before the 12:41 OOM kill.
  • The 19 lost jobs, the 14:11 end time and the after-fix figures (0.2 s, 0 %) come from the person's session as recorded in task #1348; the queries behind them are not in the record.