Skip to content

Commit 2dd45fd

Browse files
Copilothotlong
andcommitted
fix: add turbo --concurrency=3 and NODE_OPTIONS to prevent OOM/timeout on Vercel
Turbo builds 30+ workspace packages, 20+ of which use vite build. Without concurrency limits, turbo runs ~10 Vite processes simultaneously on Vercel's 2-core/8GB machine, causing OOM or extreme memory pressure that pushes the build past the 45-minute limit. With --concurrency=3, only 3 builds run in parallel (~3-4.5GB peak), staying within memory limits while completing in ~10-20 minutes. NODE_OPTIONS gives each child process 4GB heap headroom. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent d744723 commit 2dd45fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/console/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
33
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
4-
"buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && pnpm msw:init && VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
4+
"buildCommand": "cd ../.. && NODE_OPTIONS=--max-old-space-size=4096 pnpm turbo run build --filter=@object-ui/console^... --concurrency=3 && cd apps/console && pnpm msw:init && VITE_BASE_PATH=/ VITE_USE_MOCK_SERVER=true vite build",
55
"outputDirectory": "dist",
66
"framework": "vite",
77
"rewrites": [

0 commit comments

Comments
 (0)