Outcomewatch

n8n execution crashed or "unknown" with no error: running out of memory

An n8n execution marked Crashed (Unknown in older versions) with no error data means the n8n process stopped during the run, and the usual cause is running out of memory. n8n restarts, marks the runs that were in progress as crashed and has nothing to show for them. Fix it by processing fewer items per execution, moving heavy steps into sub-workflows that return small results, or giving n8n more memory.

Last updated · By Marc Vergara

This page is part of the n8n workflow monitoring guide. Crashes are one of the failures the error workflow doesn't see, and after 3 in a row n8n may unpublish the workflow.

How to tell it was memory

n8n's docs list the messages that point to an out-of-memory crash. You'll see one or more of them, not all.

On n8n Cloud you can't read the server logs. A crash that happens at the same step, on the runs with the most data, points to memory. In a 2022 forum thread, n8n staff checked a Cloud instance's logs and found exactly that: a heap out-of-memory error behind executions showing Unknown.

What uses memory in an n8n workflow

n8n keeps each node's output in memory for the whole execution. Memory grows with the data, not with how long the run takes.

How to fix it

There are two ways out: use less memory, or give n8n more. Using less usually lasts longer.

  1. Process less per execution. n8n's docs give the example of 200 rows per run instead of 10,000.
  2. Move the heavy part into a sub-workflow. Loop Over Items sends one batch at a time to an Execute Workflow node, and the sub-workflow returns only a small result, so memory is freed after each batch.
  3. Replace Code nodes with built-in nodes where you can, and drop fields you don't need early in the workflow.
  4. Don't test large batches with manual runs; they use more memory than production runs.
  5. On self-hosted n8n, give the container more memory, and raise the Node.js heap with NODE_OPTIONS=--max-old-space-size=SIZE (in megabytes).

Memory on n8n Cloud plans

On n8n Cloud, the plan sets the memory, and the only way to get more is a larger plan.

n8n's Cloud data management page lists the current limits. If a workflow fits on a self-hosted test instance but crashes on Cloud, compare against these numbers first.

Memory per n8n Cloud plan, from n8n's docs
PlanMemory
Trial and Starter640 MiB
Pro-1 (10k executions)640 MiB
Pro-2 (50k executions)1280 MiB
Enterprise4096 MiB

How to get alerted about crashed executions

The error workflow won't do it. You need a check that reads execution statuses, or one that notices missing runs.

The n8n public API can filter executions by status, and crashed is one of the values, so a scheduled script can alert on new crashed runs of the workflows that matter. A heartbeat ping at the end of the workflow also fires, since a crashed run never reaches it. Outcomewatch reads executions through the API and counts crashed runs as failures, together with missed runs and empty runs.

Act after the first crash, not the third. On instances where auto-unpublishing is on, the third crash in a row turns the workflow off.

FAQ

What does crashed mean in n8n?
The n8n process stopped while the execution was running, so the run never finished and its data wasn't saved. When n8n starts again, it marks those executions as crashed. Running out of memory is the most common cause.
Why does my n8n execution show status unknown?
Older n8n versions showed Unknown for executions that were running when the instance crashed, for example when it ran out of memory. Current versions show Crashed.
How do I fix JavaScript heap out of memory in n8n?
Process fewer items per execution, move heavy steps into a sub-workflow that returns a small result, and avoid large manual runs. On self-hosted n8n you can also raise the heap with NODE_OPTIONS=--max-old-space-size.
Does the error workflow run when an n8n execution crashes?
No, according to forum reports. A crash stops the process, so no error is recorded and the error workflow doesn't start. Alert on crashed executions through the n8n API or with a heartbeat instead.
How much memory does n8n Cloud have?
n8n's docs list 640 MiB for Trial, Starter and Pro-1, 1280 MiB for Pro-2 and 4096 MiB for Enterprise.

Sources

Next step: run through the free checklist of 12 silent failures on one client account this week.

Related