From bdace23158ba0ea7e585897ffc35318555be97ce Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Tue, 7 Jan 2025 12:13:25 -0500 Subject: [PATCH] Make Node GC kick in before available RAM runs out (#1343) Our ui container, in local dev, is currently allocated a max of 1250 MiB of RAM. Node normally allows its heap to grow up to 2 GiB, resulting in OOM errors in the container. Let's set Node's maximum heap to 1 GiB so that the GC kicks in before Kubernetes kills the container. --- frontend/dev.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/dev.Dockerfile b/frontend/dev.Dockerfile index 87037b512..33817ab6f 100644 --- a/frontend/dev.Dockerfile +++ b/frontend/dev.Dockerfile @@ -14,4 +14,5 @@ COPY . /app/ COPY src /app/src COPY static /app/static ENV DockerDev=true +ENV NODE_OPTIONS="--max-old-space-size=1024" CMD [ "pnpm", "run", "-r", "--include-workspace-root", "lexbox-dev" ]