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.
- No error workflow. Forum users report crashed executions with no error data and no error workflow run, on n8n 2.x as well as 1.x.
- No execution data. Opening the execution shows "Can't show data. The execution was interrupted, so the data was not saved", and no node is marked as failed.
- The email can go missing. On self-hosted n8n without SMTP, the email isn't sent. Until a fix in September 2026 (pull request #28863), an editor tab that was already open also missed the banner and kept showing the workflow as active.
- After that, nothing. An unpublished workflow doesn't run, so it can't fail again. It stays off until someone publishes it.
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.
- Open the workflow's executions and check the crashed ones: the time, the trigger, and how many items the last good run processed.
- 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.
- 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.
- 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).
| Cause | What you see | What to do |
|---|---|---|
| 3 crashed executions in a row | Banner: automatically deactivated due to multiple crashed executions | Fix the memory cause, then publish again |
| Someone unpublished it, in the editor or the API | Workflow shows as not published, no banner | Check the workflow's version history and who changed it |
| 1 or 2 crashed executions so far | Executions marked Crashed; the workflow is still published | Find 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
- n8n docs: execution environment variables
- n8n pull request #21888: deactivate crashed workflows
- n8n pull request #41947: count unsaved crashed executions
- n8n pull request #28863: auto-deactivation notification
- n8n docs: log streaming
- n8n community: prevent workflows from unpublishing after a crash
- n8n community: executions marked as crashed, auto-deactivated
Next step: run through the free checklist of 12 silent failures on one client account this week.