Skip to content

fix(k8s/dev): raise dev API limits to 1Gi/1 for image serving#226

Merged
vredchenko merged 1 commit into
mainfrom
chore/dev-backend-resource-limits
Jun 11, 2026
Merged

fix(k8s/dev): raise dev API limits to 1Gi/1 for image serving#226
vredchenko merged 1 commit into
mainfrom
chore/dev-backend-resource-limits

Conversation

@vredchenko

Copy link
Copy Markdown
Collaborator

Summary

The dev smartem-http-api pod is limited to 256Mi / 200m cpu. The image-serving endpoints (/grids/{id}/atlas_image, /gridsquares/{id}/gridsquare_image) decode 31MB+ MRC/TIFF files to PNG, and under a grid/atlas page's request fan-out that overruns the limit — the pod OOMKills and restarts (502s + checkered placeholders), and encodes take ~15s. This bumps the development limits to 1Gi / 1 cpu so local image serving stays stable.

Why now

This was applied as a live kubectl set resources patch during image-rendering testing, but it isn't in git — so every dev-k8s.sh redeploy (kubectl apply -k) reverted it and reintroduced the OOM. Landing it here makes redeploys durable and removes the manual re-patch step. Pairs with the /dls mount handling already in dev-k8s.sh (ensure_image_mount).

Scope

  • Development environment only. Requests stay at 128Mi/100m (Burstable QoS).
  • Stage/prod manifests are untouched — their sizing is a separate decision.
  • kubectl kustomize k8s/environments/development builds clean and renders memory: 1Gi, cpu: "1".

The atlas/grid-square image endpoints decode 31MB+ MRC/TIFF files to PNG;
under a grid/atlas page's request fan-out this overruns the 256Mi/200m dev
pod (OOMKill + ~15s encodes). Raise the development smartem-http-api limits
to 1Gi/1 so local image serving stays stable across a `dev-k8s.sh`
redeploy, instead of relying on a manual post-deploy
`kubectl set resources` patch. Requests are unchanged (Burstable). Dev
environment only; stage/prod sizing is untouched.
@github-actions github-actions Bot added the devops CI/CD, deployment, infrastructure, or tooling work label Jun 11, 2026
@vredchenko vredchenko merged commit 73a08b4 into main Jun 11, 2026
8 checks passed
@vredchenko vredchenko deleted the chore/dev-backend-resource-limits branch June 11, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops CI/CD, deployment, infrastructure, or tooling work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant