Files
accounted/vercel.json
T
Jakob Wennberg 051f467406 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 <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 15:13:49 +02:00

99 lines
2.3 KiB
JSON

{
"buildCommand": "NODE_OPTIONS=--max-old-space-size=6144 npm run build",
"regions": ["arn1"],
"crons": [
{
"path": "/api/deadlines/status/cron",
"schedule": "0 6 * * *"
},
{
"path": "/api/invoices/recurring/cron",
"schedule": "0 * * * *"
},
{
"path": "/api/settings/booking-templates/sync/cron",
"schedule": "30 4 * * *"
},
{
"path": "/api/tax-deadlines/cron",
"schedule": "0 0 * * *"
},
{
"path": "/api/extensions/enable-banking/sync/cron",
"schedule": "0 5 * * *"
},
{
"path": "/api/extensions/stripe/transactions/cron",
"schedule": "30 3 * * *"
},
{
"path": "/api/extensions/woocommerce/orders/cron",
"schedule": "45 3 * * *"
},
{
"path": "/api/extensions/shopify/orders/cron",
"schedule": "15 3 * * *"
},
{
"path": "/api/documents/verify/cron",
"schedule": "0 3 * * *"
},
{
"path": "/api/sandbox/cleanup/cron",
"schedule": "0 4 * * *"
},
{
"path": "/api/events/cleanup/cron",
"schedule": "0 2 * * *"
},
{
"path": "/api/extensions/cloud-backup/auto-sync/cron",
"schedule": "0 * * * *"
},
{
"path": "/api/idempotency/cleanup/cron",
"schedule": "30 * * * *"
},
{
"path": "/api/pending-operations/expire/cron",
"schedule": "30 2 * * *"
},
{
"path": "/api/extensions/skatteverket/skattekonto/sync/cron",
"schedule": "0 4 * * *"
},
{
"path": "/api/extensions/skatteverket/agi/kvittenser/cron",
"schedule": "*/15 * * * *"
},
{
"path": "/api/extensions/skatteverket/vat/kvittenser/cron",
"schedule": "30 */2 * * *"
},
{
"path": "/api/webhooks/dispatch/cron",
"schedule": "* * * * *"
},
{
"path": "/api/extensions/whatsapp-inbox/sweep/cron",
"schedule": "* * * * *"
},
{
"path": "/api/extensions/whatsapp-inbox/retention/cron",
"schedule": "15 4 * * *"
},
{
"path": "/api/extensions/invoice-inbox/sweep/cron",
"schedule": "*/2 * * * *"
},
{
"path": "/api/bookkeeping/accruals/post-due/cron",
"schedule": "15 5 * * *"
},
{
"path": "/api/receipt-hunt/cron",
"schedule": "30 5 * * *"
}
]
}