Redis: READONLY You can't write against a read only replica
The client is connected to a replica (or a failed-over node) and tried to write.
Seen on:
Redis
Meaning
After a failover the old primary becomes a replica, clients with stale connections or a hard-coded host keep writing to it. Use Sentinel/cluster-aware clients or the managed primary endpoint.
Common causes
- Connected to a replica host/port
- Failover happened, client still on old primary
- Read-only endpoint used for writes (managed Redis)
⚡ Quick fix
- Use the primary/write endpoint
- Use Sentinel or cluster-aware client configuration
- Reconnect clients after failover
Detailed fix by platform
Shell
redis-cli -h $HOST INFO replication | grep role
How to diagnose
- Role — master or slave/replica?
- Endpoint — Primary or reader?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 1418 MySQL ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
- MISCONF Redis: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk
- NOAUTH ReplyError: NOAUTH Authentication required.
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026