Outcomewatch

Why n8n unpublished (deactivated) your workflow after a crash

n8n unpublishes a workflow when its last 3 executions all crashed, which means the n8n process stopped during each run, usually because it ran out of memory. n8n Cloud has this turned on; on self-hosted n8n it's off unless you set N8N_WORKFLOW_AUTODEACTIVATION_ENABLED. The error workflow doesn't run for crashed executions, so nothing alerts you except a banner in the editor and, if email is set up, an email.

Last updated · By Marc Vergara

This page is part of the n8n workflow monitoring guide. It covers the message "This workflow was automatically deactivated due to multiple crashed executions". For what makes an execution crash in the first place, see n8n executions marked crashed or unknown.

What n8n does after repeated crashes

When n8n starts again after a crash, it marks the executions that were running as crashed. If a workflow's last 3 executions all crashed, n8n unpublishes it.

The feature arrived in December 2025 (pull request #21888), and n8n 2.x calls it unpublishing; older posts say deactivating. The editor shows a banner, and n8n sends an email to the workflow's owner if the instance can send email. It's a safety measure: a workflow that crashes the instance on every run would otherwise keep taking down every other workflow on it.

Two environment variables control it. N8N_WORKFLOW_AUTODEACTIVATION_ENABLED defaults to false, and N8N_WORKFLOW_AUTODEACTIVATION_MAX_LAST_EXECUTIONS defaults to 3. An n8n engineer wrote in pull request #41947 that n8n Cloud turns it on, which matches the forum reports, nearly all from Cloud users.

Why nothing alerted you

A crash isn't an error. The execution never reaches the point where n8n would run the error workflow.

How to fix it before you publish again

Find the cause first. Publishing a workflow that still runs out of memory brings back the same crashes, and on n8n Cloud each one restarts the whole instance.

  1. Open the workflow's executions and check the crashed ones: the time, the trigger, and how many items the last good run processed.
  2. Look for the usual memory causes: a large file or API response, thousands of items in one run, Code nodes copying data, or several heavy workflows running at once.
  3. Split the work: fewer items per run, or a sub-workflow that handles one batch and returns a small result. The steps are in n8n executions marked crashed or unknown.
  4. Test with a production-sized batch, not a 5-item sample, then publish again and watch the next few executions.

How to notice an unpublished workflow

The only reliable signal is outside the workflow: something that knows it should be running.

A check that knows the schedule sees the missing runs within one interval, and a heartbeat ping from the end of the workflow does the same. Through the n8n public API you can also list workflows with active=false, or list executions with status=crashed, and alert when a critical workflow shows up in either. Log streaming sends a "Workflow deactivated" event, but n8n lists log streaming on Enterprise plans only.

Some users re-publish automatically through the API (POST /workflows/{id}/publish). Without a fix, that brings the crash loop back, so alert a person instead.

Should you turn it on for self-hosted n8n?

For instances that run many client workflows, usually yes. One workflow that runs out of memory on every run shouldn't take the others down with it.

Turn it on only together with an alert for unpublished workflows. Otherwise you swap a loud failure (the instance keeps restarting) for a silent one (a workflow that stopped running).

Why an n8n workflow is no longer published
CauseWhat you seeWhat to do
3 crashed executions in a rowBanner: automatically deactivated due to multiple crashed executionsFix the memory cause, then publish again
Someone unpublished it, in the editor or the APIWorkflow shows as not published, no bannerCheck the workflow's version history and who changed it
1 or 2 crashed executions so farExecutions marked Crashed; the workflow is still publishedFind the memory cause before the next crash

FAQ

Why does n8n say my workflow was automatically deactivated?
Its last 3 executions crashed, meaning n8n stopped during each run, usually because it ran out of memory. n8n unpublishes the workflow so it doesn't keep crashing the instance.
Can I stop n8n Cloud from unpublishing workflows after a crash?
There is no per-workflow setting for it. On self-hosted n8n you control it with N8N_WORKFLOW_AUTODEACTIVATION_ENABLED. On Cloud, fix the memory cause so executions stop crashing.
Does the n8n error workflow run when an execution crashes?
Forum reports say no. A crash stops the n8n process, so no error is recorded and the error workflow isn't started.
How many crashes does it take for n8n to unpublish a workflow?
3 by default, set by N8N_WORKFLOW_AUTODEACTIVATION_MAX_LAST_EXECUTIONS. The last executions must all have crashed; a successful run in between resets it.
How do I get alerted when an n8n workflow is unpublished?
Use a check that knows the workflow's schedule, a heartbeat ping, or a script that lists workflows with active=false through the n8n API. Log streaming's Workflow deactivated event requires an Enterprise plan.

Sources

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

Related