Skip to content

Commit cbe6a67

Browse files
AntoLClunika
authored andcommitted
🔧(y-provider) increase Node.js memory limit
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.
1 parent f91223f commit cbe6a67

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/frontend/servers/y-provider/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ RUN NODE_ENV=production yarn install --frozen-lockfile
5151
# Remove npm, contains CVE related to cross-spawn and we don't use it.
5252
RUN rm -rf /usr/local/bin/npm /usr/local/lib/node_modules/npm
5353

54+
ENV NODE_OPTIONS="--max-old-space-size=2048"
55+
5456
# Un-privileged user running the application
5557
ARG DOCKER_USER
5658
USER ${DOCKER_USER}

src/helm/env.d/feature/values.impress.yaml.gotmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ yProvider:
145145
COLLABORATION_SERVER_ORIGIN: https://{{ .Values.feature }}-docs.{{ .Values.domain }}
146146
COLLABORATION_SERVER_SECRET: my-secret
147147
Y_PROVIDER_API_KEY: my-secret
148+
NODE_OPTIONS: "--max-old-space-size=1024"
148149

149150
docSpec:
150151
enabled: true

0 commit comments

Comments
 (0)