From 5352292d5b20208d4291f27ce0ff5242e7c0fb0a Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Wed, 25 Mar 2026 13:52:18 +0100 Subject: [PATCH] fix(storyteller): OOM fix - limit Node heap, restore \, bump RAM to 10GB - NODE_OPTIONS=--max-old-space-size=4096 to cap V8 heap during yarn install/build - Restore \ prefixes removed by formatter - RAM 8192 -> 10240 in JSON - yarn install --network-timeout 600000 for large monorepo fetch --- install/storyteller-install.sh | 7 ++++--- json/storyteller.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install/storyteller-install.sh b/install/storyteller-install.sh index d29601b3..f28d7ed9 100644 --- a/install/storyteller-install.sh +++ b/install/storyteller-install.sh @@ -33,8 +33,9 @@ fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "ta msg_info "Setting up Storyteller" cd /opt/storyteller -yarn install -gcc -g -fPIC -rdynamic -shared web/sqlite/uuid.c -o web/sqlite/uuid.c.so +export NODE_OPTIONS="--max-old-space-size=4096" +$STD yarn install --network-timeout 600000 +$STD gcc -g -fPIC -rdynamic -shared web/sqlite/uuid.c -o web/sqlite/uuid.c.so STORYTELLER_SECRET_KEY=$(openssl rand -base64 32) cat </opt/storyteller/.env STORYTELLER_SECRET_KEY=${STORYTELLER_SECRET_KEY} @@ -54,7 +55,7 @@ export CI=1 export NODE_ENV=production export NEXT_TELEMETRY_DISABLED=1 export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node -yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build +$STD yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build cp -r /opt/storyteller/web/.next/static /opt/storyteller/web/.next/standalone/web/.next/static if [[ -d /opt/storyteller/web/public ]]; then cp -r /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public diff --git a/json/storyteller.json b/json/storyteller.json index 50c0a2cd..3b79954a 100644 --- a/json/storyteller.json +++ b/json/storyteller.json @@ -20,7 +20,7 @@ "script": "ct/storyteller.sh", "resources": { "cpu": 4, - "ram": 8192, + "ram": 10240, "hdd": 16, "os": "Debian", "version": "13"