Redis client now recovers after failover
n8n instances can now survive Redis failover events in multi-AZ deployments without getting stuck on write operations.
When Redis fails over in a multi-AZ setup, the client may end up connected to a read-only replica. Any write operation throws a READONLY error, and without special handling, the client remains stuck — unable to recover automatically.
This fix adds automatic reconnection logic. When a READONLY error is detected, the client reconnects to the new primary and retries the operation. An environment variable controls whether this behavior is enabled: QUEUE_BULL_REDIS_RECONNECT_ON_FAILOVER.
The change lives in the Redis client service and the scaling-mode configuration. The feature is enabled by default, since reliability after failover is more important than preserving the old broken behavior.
View Original GitHub DescriptionFact Check
Summary
If the Redis server fails over, it will start to throw READONLY errors when you try to write because you're trying to write to a readonly server. In this case, the client should reconnect.
By default this doesn't happen, so we leave this disabled by default as well, but we expose an option to enable it.
Related Linear tickets, Github issues, and Community forum posts
Review / Merge checklist
- PR title and summary are descriptive. (conventions) <!-- **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** -->
- Docs updated or follow-up ticket created.
- Tests included. <!-- A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. -->
- PR Labeled with
release/backport(if the PR is an urgent fix that needs to be backported)