From c4829cf2807c947dba2a2dce5be8226a15c69890 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Tue, 19 May 2026 05:20:34 +0000 Subject: [PATCH] fix: raise Node heap cap to 512MB and bump pod memory limit (#838) --- Dockerfile | 6 ++++-- k8s/deploy.yaml | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c8c289..489d1f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,8 +30,10 @@ ENV TZ Europe/Stockholm # Install wgc CLI globally for Cosmo Router composition RUN npm install -g wgc@latest -# Cap Node.js heap for runtime wgc invocations to prevent OOM -ENV NODE_OPTIONS="--max-old-space-size=64" +# Cap Node.js heap for runtime wgc invocations. 512MB leaves room for +# composing supergraphs with many subgraphs; lower caps (e.g. 64MB) OOM +# wgc as the subgraph count grows. +ENV NODE_OPTIONS="--max-old-space-size=512" # Copy timezone data and certificates COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo diff --git a/k8s/deploy.yaml b/k8s/deploy.yaml index 5fc51f2..0f051cf 100644 --- a/k8s/deploy.yaml +++ b/k8s/deploy.yaml @@ -43,7 +43,9 @@ spec: resources: requests: cpu: "20m" - memory: "20Mi" + memory: "128Mi" + limits: + memory: "768Mi" livenessProbe: httpGet: path: /health/live