Skip to content

fix(infra): raise PostgREST mem cap 96m→256m (OOM killed NAV ingest) - #199

Merged
Oscar-west merged 1 commit into
mainfrom
fix/postgrest-oom-mem-limit
Sep 13, 2026
Merged

Oscar-west merged 1 commit into
mainfrom
fix/postgrest-oom-mem-limit

Conversation

@Oscar-west

Copy link
Copy Markdown
Contributor

What

Raises the rest (PostgREST) memory cap in compose.prod.yml from 96m to 256m.

Why

The 2026-06-03 supabase fleet re-up (compose project rename, #190/#192) applied the 96m cap to a freshly created kiba-supabase-rest. From that moment, every NAV batch upsert (POST /nav_postings?on_conflict=id — a 50-page backfill body) exceeded the cgroup limit. The kernel OOM-killed postgrest mid-request (dmesg: Memory cgroup out of memory: Killed process (postgrest), RestartCount=35), Kong returned 502, the daily 06:00 backfill-nav tick 500'd, and NAV ingest died silently with data frozen at 2026-06-01.

This went unnoticed until 2026-07-10 because the root disk then also filled (separate issue), taking Postgres down entirely and blanking the landing page.

Verification

  • docker update --memory 256m kiba-supabase-rest applied at runtime on 2026-07-10
  • Immediately after: backfill-nav succeeded and drained the full ~95k-posting backlog (two ticks, completed:true), snapshots recomputed for 2026-07-10, landing-page Arbeidsmarked/Oppstart cards render again
  • Note: deploy.sh does NOT recreate the supabase fleet, so merging this changes nothing immediately — it prevents a regression at the next fleet re-up (the runtime docker update is already in effect)

🤖 Generated with Claude Code

The 2026-06-03 supabase fleet re-up (project rename, PR #190) applied
compose.prod.yml's rest: 96m cap for the first time. Every NAV batch
upsert (POST /nav_postings?on_conflict=id) since then blew the cgroup
limit: the kernel OOM-killed postgrest mid-request (RestartCount=35),
Kong returned 502, backfill-nav 500'd, and NAV ingest died silently
with data frozen at 2026-06-01.

256m was applied at runtime via docker update on 2026-07-10 and
verified by draining the full 95k-posting backlog; this commit makes
it survive the next fleet re-up.

Co-Authored-By: Claude <noreply@anthropic.com>
@Oscar-west
Oscar-west merged commit 529edc7 into main Sep 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant