Hello everyone, first post (let me know if i forgot to post something)
N8N keeps crashing after couple of days running. Everytime i restart using:
cd n8n-docker-caddy
docker compose down
docker compose up -d
it keeps downloading new N8N image, although there is no new version available. N8N is on a cloud server by hetzner
Do you have workflows running that could be causing it to run out of memory and crash?
That’s the most common reason for instances crashing. For example workflows with infinite loops or recursion. Or pulling in enough data to exceed instance limits.
Otherwise please share more information on your setup. What database? What configuration is used? Is workflow pruning enabled? Any logs that could help.
Regarding the new image issue, are you using latest image? With the latest tag, docker compose up -d will always check for a newer image and pull layers even if the version hasn’t changed, because Docker needs to verify the manifest.
Or do you have pull_policy: always in the config? Then the image is always checked and sometimes re-pulled.
Some recommendations
-
Pin to a specific version to avoid repeated pulls:
image: n8nio/n8n:2.4.0(or whatever version you want) -
Check memory usage before the crash:
docker statsor set up monitoring -
Add resource limits to the container and configure N8N to prune old executions
-
Check logs before the crash occurs:
docker logs n8n --tail 500
Thank you for your fast reply.
Yes indeed docker-compose.yml had n8nio/n8n:latest in it, but no pull policies. I also went through all my workflows (i never had any messages or notification that something didn execute properply, once setup) two workflows where constantly executing, i guess thats the infinite loop. One of the workflows has a cronos node but with 24h trigger. On top of that, i already disabled and unpublished this workflow a week prior, yet it was still executing. And the second one, which is connected via “Call node” was also executed almost every second.
In last 7 days all in all it was almost 20k executions across all workflows. I guess this is my reason why it keeps crashing. The question remains, why is it still executing even tho its disabled and unpublished? I just now archived both of the workflows and set the latest version of n8n to 2.4.0.
Concerning the crashes, they were always random and never, when i was working in n8n.
Thanks again, i guess my problem is solved hopefully. Lets see how long it will last ![]()
It sounds like infinite recursion of workflows, which explains why it would crash randomly depending on your limits and load in the memory.
Unpublished workflows should not trigger again. But subworkflows would still execute sine they don’t need to be published.

