Hi all,
I logged in today to a bizarre error - 500/502 on all of my workflow calls (API and MCP). After two hours of debugging I came to the conclusion that I can only run ~29 workflows without crashing my instance. Details below.
Environment:
- n8n version: 1.123.73 (also reproduced on 2.35.3 and 2.36.1 before pinning back)
- Deployment: self-hosted, Docker (official n8nio/n8n image)
- Node.js version bundled in image: v24.13.1 / v24.18.1 (varies by exact tag)
- Database: SQLite
- OS/host: Ubuntu 24.04, single VPS
Symptom:
On startup, once n8n reaches the “Start Active Workflows” phase and begins registering trigger nodes (webhooks/schedules/pollers), the whole process crashes with:
Fatal error in , line 0
Check failed: isolate_->IsOnCentralStack().
#FailureMessage Object: 0x…
----- Native stack trace -----
No further stack trace is printed. The container restarts (via Docker’s restart policy) and crashes again in a loop. docker inspect confirms OOMKilled: false - this is not a memory-limit kill, it’s a native V8 engine assertion failure.
What we ruled out (via extensive isolated testing across ~2 hours of reproduction):
- Not a specific workflow’s configuration. Deactivating the workflow that appeared last in the activation log before each crash did not stop the crash - it just moved to whatever workflow was next in the (now shorter) active list.
- Not the task runner. Reproduced identically with N8N_RUNNERS_MODE=internal, external (with N8N_RUNNERS_AUTH_TOKEN set), and N8N_RUNNERS_ENABLED=false (fully disabled).
- Not ulimits. Reproduced identically after raising memlock to unlimited and nofile to 65536 via Docker ulimits:.
- Not SQLite file state. Reproduced identically after cleaning stale -wal/-shm files and fixing file ownership.
- Not the specific Node/n8n version pairing - reproduced on both the 1.x and 2.x lines, both bundling Node 24.
What we confirmed via binary search (systematically deactivating/reactivating workflows in batches, each time doing a clean container stop → CLI update (n8n update:workflow --id --active false/true) → start → observe):
- 0 active workflows: stable, boots cleanly.
- ~26-29 active workflows: stable, boots cleanly, restart count stays flat.
- 31 active workflows: crashes every time, at the exact same point in the log (immediately after the last successfully-activating trigger registers).
- The exact threshold appears to sit between 29 and 31, but we didn’t narrow further than that once we had a workable number.
- This instance has ~200 total workflow definitions (many are dormant/dev/duplicate), of which ~77 were active before this incident began - well past the crash threshold we’ve now identified.
Our working theory: something in the trigger-activation loop (webhook route registration, cron scheduling, or the interaction with V8’s stack-switching machinery used by worker_threads for the task runner and/or the vm sandbox n8n uses for Code node execution) is either leaking a resource per registered trigger, or hitting a fixed-size internal limit, that manifests as a native crash rather than a clean error once a threshold count of triggers is being registered in quick succession during startup.
Questions:
- Is there a known internal limit (V8 isolate count, worker thread pool size, file descriptor pool, etc.) tied to trigger/webhook registration during startup that could produce this specific assertion failure?
- Is this related to the deprecation of the legacy in-process Code execution and the move to mandatory task runners in the 2.x line? (We saw the same crash on 1.123.73 with runners fully disabled, which argues against this, but flagging in case there’s a shared code path.)
- Is there a recommended way to stagger/throttle trigger activation on startup (e.g. an env var to activate workflows in batches with a delay) as a workaround while we wait for a fix, rather than us manually capping active workflow count?
Happy to provide the full startup log, a minimal reproduction (we can likely trim this down to a smaller workflow set that still reproduces it), or any other diagnostic info needed.