acme/payments-api
feat(settlements): add nightly batch reconciler
- Status
- Failed
- Commit
- 9f2c1d4main
- Environment
- productionpayments-prod
- Duration
- 2m 26s
- Started
- Aug 14, 09:121h ago
- Author
- mara.k
- Triggered by
- push to main
- Replicas
- 1 / 4 ready
- Image
- ghcr.io/acme/payments-api:9f2c1d4
Pipeline
Build → manifest → deploy → verify- Step 11m 14sBuild image
ghcr.io/acme/payments-api:9f2c1d4 — 214 MB, 12 layers
Started 09:12:05 UTC
- Step 23sGenerate manifests
4 resources generated for namespace payments-prod
Started 09:13:19 UTC
- Step 328sDeploy to cluster
Rollout started — 4 replicas, maxSurge 1, maxUnavailable 0
Started 09:13:22 UTC
- Step 441sVerify rolloutBlocked here
3 of 4 pods OOMKilled before passing the readiness probe
Started 09:13:50 UTC
Run logs
DevMate summary
high confidenceWhat happened
Rollout blocked by memory limits, not by your code
The image built and the manifests applied cleanly. During verification, 3 of 4 pods were OOMKilled about 10 seconds after start and fell into CrashLoopBackOff, so the rollout never reached the minimum of 3 available replicas. The new nightly batch reconciler loads settlement batches into memory at boot, which pushes steady-state usage to roughly 249Mi against a 256Mi container limit that has not changed since March. Traffic was never shifted — the previous revision (2e7f83b) is still serving production.
Suggested fixes
- 1
Raise the memory limit to 512Mi
The reconciler needs headroom above the 249Mi observed peak. Doubling the limit leaves ~50% margin and matches what identity-service runs with.
bashkubectl set resources deployment/payments-api -n payments-prod --limits=memory=512Mi --requests=memory=384Mi - 2
Stream settlement batches instead of loading them at boot
SettlementReconciler.loadPendingBatches() reads the full result set into a list. Paging it at 500 rows would keep the container under 300Mi without changing the limit.
- 3
Roll back while you decide
Production is already on the previous revision, but rolling back explicitly clears the CrashLoopBackOff pods and stops the restart noise in alerts.
bashkubectl rollout undo deployment/payments-api -n payments-prod
Generated manifests
4 resources- payments-prod
deployment.yaml
Deployment · payments-api
- payments-prod
service.yaml
Service · payments-api
- payments-prod
ingress.yaml
Ingress · payments-api
- payments-prod
configmap.yaml
ConfigMap · payments-api-config