From 2cbd43caae26f47db03161cf04b57696bbc89d11 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Wed, 25 Mar 2026 17:14:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(y-provider)=20increase=20Node.js?= =?UTF-8?q?=20memory=20limit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default, Node.js has a memory limit of around 512MB, which can lead to out-of-memory errors when processing large documents. This commit increases the memory limit to 2GB for the y-provider server, allowing it to handle larger documents without crashing. --- src/frontend/servers/y-provider/Dockerfile | 2 ++ src/helm/env.d/feature/values.impress.yaml.gotmpl | 1 + 2 files changed, 3 insertions(+) diff --git a/src/frontend/servers/y-provider/Dockerfile b/src/frontend/servers/y-provider/Dockerfile index 01058037a..f5fb7d3eb 100644 --- a/src/frontend/servers/y-provider/Dockerfile +++ b/src/frontend/servers/y-provider/Dockerfile @@ -51,6 +51,8 @@ RUN NODE_ENV=production yarn install --frozen-lockfile # Remove npm, contains CVE related to cross-spawn and we don't use it. RUN rm -rf /usr/local/bin/npm /usr/local/lib/node_modules/npm +ENV NODE_OPTIONS="--max-old-space-size=2048" + # Un-privileged user running the application ARG DOCKER_USER USER ${DOCKER_USER} diff --git a/src/helm/env.d/feature/values.impress.yaml.gotmpl b/src/helm/env.d/feature/values.impress.yaml.gotmpl index 6922261f2..5f007538d 100644 --- a/src/helm/env.d/feature/values.impress.yaml.gotmpl +++ b/src/helm/env.d/feature/values.impress.yaml.gotmpl @@ -145,6 +145,7 @@ yProvider: COLLABORATION_SERVER_ORIGIN: https://{{ .Values.feature }}-docs.{{ .Values.domain }} COLLABORATION_SERVER_SECRET: my-secret Y_PROVIDER_API_KEY: my-secret + NODE_OPTIONS: "--max-old-space-size=1024" docSpec: enabled: true