The Dockerfile's NODE_OPTIONS=--max-old-space-size=64 was added to keep idle Node memory low, but in practice it OOMs wgc router compose itself as soon as the supergraph has more than a handful of subgraphs:
FATAL ERROR: Ineffective mark-compacts near heap limit
Allocation failed - JavaScript heap out of memory
With an empty cosmoRouterConfig, callers of latestSchema(ref) get nothing — visible to the shiny gateway as it switches to consuming the pre-composed config straight from the schemas service.
k8s/deploy.yaml: bump container memory request 20Mi → 128Mi and add a 768Mi limit. The Dockerfile env covers the Node heap, so drop the manifest's NODE_OPTIONS override.
The live k8s.unbound.se cluster was already patched in place via kubectl set env + kubectl set resources; this commit makes the manifest match (and removes the env override since the new image will carry the higher cap by default).
Test plan
After rollout, latestSchema(ref: "Shiny@prod") returns a non-empty cosmoRouterConfig.
Pod memory stays well below 768Mi at idle.
The Dockerfile's `NODE_OPTIONS=--max-old-space-size=64` was added to keep idle Node memory low, but in practice it OOMs `wgc router compose` itself as soon as the supergraph has more than a handful of subgraphs:
```
FATAL ERROR: Ineffective mark-compacts near heap limit
Allocation failed - JavaScript heap out of memory
```
With an empty `cosmoRouterConfig`, callers of `latestSchema(ref)` get nothing — visible to the shiny gateway as it switches to consuming the pre-composed config straight from the schemas service.
## Changes
- `Dockerfile`: bump `NODE_OPTIONS=--max-old-space-size` 64 → 512.
- `k8s/deploy.yaml`: bump container memory request 20Mi → 128Mi and add a 768Mi limit. The Dockerfile env covers the Node heap, so drop the manifest's NODE_OPTIONS override.
The live `k8s.unbound.se` cluster was already patched in place via `kubectl set env` + `kubectl set resources`; this commit makes the manifest match (and removes the env override since the new image will carry the higher cap by default).
## Test plan
- [ ] After rollout, `latestSchema(ref: "Shiny@prod")` returns a non-empty `cosmoRouterConfig`.
- [ ] Pod memory stays well below 768Mi at idle.
argoyle
scheduled this pull request to auto merge when all checks succeed 2026-05-19 04:56:43 +00:00
The Dockerfile's NODE_OPTIONS=--max-old-space-size=64 was added to keep
idle Node memory low, but in practice it OOMs wgc router compose as soon
as the supergraph has more than a handful of subgraphs:
FATAL ERROR: Ineffective mark-compacts near heap limit
Allocation failed - JavaScript heap out of memory
Bake the higher cap into the image and raise the container memory limit
(k8s/deploy.yaml) so the cgroup doesn't kill the pod at the new ceiling.
Memory request stays modest so the pod still schedules tightly when idle.
The live k8s.unbound.se cluster was already patched in place (kubectl
set env + set resources). This commit makes the manifest match.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The Dockerfile's
NODE_OPTIONS=--max-old-space-size=64was added to keep idle Node memory low, but in practice it OOMswgc router composeitself as soon as the supergraph has more than a handful of subgraphs:With an empty
cosmoRouterConfig, callers oflatestSchema(ref)get nothing — visible to the shiny gateway as it switches to consuming the pre-composed config straight from the schemas service.Changes
Dockerfile: bumpNODE_OPTIONS=--max-old-space-size64 → 512.k8s/deploy.yaml: bump container memory request 20Mi → 128Mi and add a 768Mi limit. The Dockerfile env covers the Node heap, so drop the manifest's NODE_OPTIONS override.The live
k8s.unbound.secluster was already patched in place viakubectl set env+kubectl set resources; this commit makes the manifest match (and removes the env override since the new image will carry the higher cap by default).Test plan
latestSchema(ref: "Shiny@prod")returns a non-emptycosmoRouterConfig.f3f96c59a1to921d4e39fa