We are running n8n in Queue Mode on Kubernetes and would like to clarify how n8n handles worker crashes and stalled executions.
Our main question is about job recovery when a worker crashes or is restarted.
Suppose a worker picks up an execution from the Redis queue and starts processing it, but the worker crashes before the execution is completed.
-
Will another available worker detect the stalled job and take it over?
-
If so, does the new worker continue the execution from where the previous worker stopped, or does it restart the execution from the beginning?
-
Is this worker-failover/stalled-job recovery behavior officially supported in the current n8n Queue Mode architecture?
-
The documentation mentions that
queue_worker_max_stalled_countis deprecated. Does that mean stalled-job detection/recovery itself is still supported, with this particular configuration option simply no longer being used? -
What is the current recommended configuration/behavior for handling worker crashes in Queue Mode?
Observation
We have also observed an interesting behavior when multiple workflows are triggered concurrently.
Initially, some executions appear as Error in the n8n UI shortly after they start. However, after some time, those same executions continue processing and eventually finish with Success.
Because this happens during periods of higher concurrent workload, we suspect that a worker may be becoming overloaded, crashing, or restarting, and that another worker may subsequently be picking up a stalled job.
However, we are not sure whether this is actually what is happening.
Specifically, we would like to understand:
-
If a worker crashes while processing an execution, what status does n8n initially record for that execution?
-
Can an execution temporarily appear as Error/Failed and subsequently continue and become Success?
-
If another worker takes over a stalled job, how does n8n determine what state to resume from?
-
Does the second worker resume the execution from the last persisted state, or does it execute the workflow again from the beginning?
-
If the execution was already marked as
crashedorerror, how can it subsequently continue and eventually become successful? -
Could what we are observing instead be caused by a UI/status update arriving before the actual execution state is finalized?
Environment
-
n8n version: n8nio/n8n:latest
-
Deployment: Kubernetes
-
Execution mode: Queue Mode
-
Database: PostgreSQL
-
Queue: Redis
-
Main pods: 1
-
Worker pods: 1 min , 10 max
-
Approximate concurrent executions: 10
We would appreciate clarification on the current n8n Queue Mode worker-failure/stalled-job recovery mechanism, especially how execution state is persisted and recovered when a worker crashes or restarts.