fix(k8s/dev): raise dev API limits to 1Gi/1 for image serving#226
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The dev
smartem-http-apipod 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 resourcespatch during image-rendering testing, but it isn't in git — so everydev-k8s.shredeploy (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/dlsmount handling already indev-k8s.sh(ensure_image_mount).Scope
kubectl kustomize k8s/environments/developmentbuilds clean and rendersmemory: 1Gi,cpu: "1".