mirror of
https://github.com/suitenumerique/docs.git
synced 2026-04-25 17:15:01 +02:00
🔧(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.
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user