Skip to content

Commit

Permalink
Make Node GC kick in before available RAM runs out (#1343)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rmunn authored Jan 7, 2025
1 parent 8828874 commit bdace23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

0 comments on commit bdace23

Please sign in to comment.