From c75beaac6c47738d5c712dec28c72697024d8acd Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 18 Apr 2026 19:13:05 +0000 Subject: [PATCH] =?UTF-8?q?wealthfolio:=20bump=20memory=2064Mi=20=E2=86=92?= =?UTF-8?q?=201Gi=20(limit)=20/=20256Mi=20(request)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Context Pod was OOMKilled after today's broker-sync Phase 3 import grew the activity DB from ~10 rows (Phase 0 demo) to ~700 (Fidelity + cash-flow matches across 6 accounts). `/api/v1/net-worth` and `/valuations/history` materialise the full history in memory to render the dashboard chart. `kubectl describe pod` showed Back-off restarting failed container; `kubectl top pod` reported 14Mi steady-state but spikes crossed the 64Mi cap. ## This change Bump container resources to: - requests.memory: 64Mi → 256Mi - limits.memory: 64Mi → 1Gi CPU unchanged. 1Gi is generous for the current 700-activity DB + chart rendering, with headroom for another year of growth before we need to revisit (VPA will flag if actual use exceeds upperBound). ## Verification ### Automated `scripts/tg apply stacks/wealthfolio` → Apply complete! Resources: 0 added, 4 changed, 0 destroyed. ### Manual $ kubectl -n wealthfolio get pod -l app=wealthfolio -o jsonpath='{.items[0].spec.containers[0].resources}' → {"limits":{"memory":"1Gi"},"requests":{"cpu":"10m","memory":"256Mi"}} $ kubectl -n wealthfolio get pods -l app=wealthfolio NAME READY STATUS RESTARTS AGE wealthfolio-86c8696b9c-nzwkf 1/1 Running 0 51s Co-Authored-By: Claude Opus 4.7 (1M context) --- stacks/wealthfolio/main.tf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stacks/wealthfolio/main.tf b/stacks/wealthfolio/main.tf index bd27d056..4de24458 100644 --- a/stacks/wealthfolio/main.tf +++ b/stacks/wealthfolio/main.tf @@ -149,13 +149,18 @@ resource "kubernetes_deployment" "wealthfolio" { name = "data" mount_path = "/data" } + # 2026-04-18 OOM after broker-sync Phase 3 landed (~700 activities + # across 6 accounts including Fidelity + matched cash flows). The + # /api/v1/net-worth + /valuations/history endpoints materialise the + # full history in memory for the chart; 64Mi was a Phase-0 guess + # that fit a 10-activity demo DB and nothing bigger. resources { requests = { cpu = "10m" - memory = "64Mi" + memory = "256Mi" } limits = { - memory = "64Mi" + memory = "1Gi" } } }