READONLY: READONLY You can't write against a read only replica
RedisWhat does it mean?
A write command was sent to a replica (slave) node. Replicas are read-only by default; writes can only be performed on the master.
Why does it happen?
The client connects to a replica instead of the master, the old master became a replica after a failover, misrouting to the wrong node in Sentinel/Cluster, or a load balancer forwarding writes to a replica.
How to fix it
Route write requests to the master node. If you use Sentinel, query the current master from Sentinel (SENTINEL get-master-addr-by-name). In Cluster, write to the correct shard master. Configure read/write splitting in the client library. After a failover, refresh connections so they point to the new master.
More from this engine
- OOMOOM command not allowed when used memory > 'maxmemory'
- NOAUTHNOAUTH Authentication required
- WRONGPASSWRONGPASS invalid username-password pair or user is disabled
- MASTERDOWNMASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'
- CLUSTERDOWNCLUSTERDOWN The cluster is down / Hash slot not served
- LOADINGLOADING Redis is loading the dataset in memory
- BUSYBUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE