DBAtlas · Database operations atlas

READONLY: READONLY You can't write against a read only replica

Redis

What 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.

Open in DBAtlas →

More from this engine