fix(build): give the Vercel type-check worker a 6 GB heap so next build stops stalling at the 45-min cap (#1749)
Four production builds since 2026-08-14 (dpl_Cw4smfRf, dpl_2RPDg4vZ, dpl_DixYhSW4, dpl_9ECLphY4) and PR #1746's preview died with BUILD_EXCEEDED_MAXIMUM_TIME. Every log stops at the same line right after a normal ~92 s compile: "Running TypeScript ...", then nothing for 44 minutes. The type-check runs in a Next worker that loads the whole tsconfig program (3,500 files incl. 1,371 tests). Measured locally it needs ~4.5 GB; on the standard 4-core/8 GB Vercel machine the worker runs at V8's default ~4 GB heap ceiling, so it sits at the edge and sometimes thrashes in GC forever instead of failing. Normal builds show it too: the TS phase is 105 s most of the time and 2.3-2.4 min on the unlucky ones. CI hit the same wall on 2026-08-19 and got NODE_OPTIONS=--max-old-space-size=8192 in core-build.yml; Vercel never got the equivalent. vercel.json buildCommand now runs the same npm run build under NODE_OPTIONS=--max-old-space-size=6144. The worker inherits it (Next creates it with isolatedMemory: false). buildCommand rather than a project env var (would also reach function runtime) or build.env (deprecated in the schema). Co-authored-by: Jakob Wennberg <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Jakob Wennberg
Claude Fable 5
parent
e733ab7c43
commit
051f467406
File diff suppressed because one or more lines are too long
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"buildCommand": "NODE_OPTIONS=--max-old-space-size=6144 npm run build",
|
||||
"regions": ["arn1"],
|
||||
"crons": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user