TraceResolve

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

ReplyError: READONLY You can't write against a read only replica. [redis] Unhandled error event: ReplyError: READONLY You can't write against a read only replica
Immediate Remediation
bash
redis-cli -p 6379 -a $REDIS_PASSWORD ROLE | grep -q master || redis-cli -p 6379 -a $REDIS_PASSWORD REPLICAOF NO ONE
Root Cause Analysis

The connected Redis endpoint is a replica that is still in read-only mode, either because a failover promoted the old master to replica or because the application is pointed at the wrong node; all writes are rejected until the instance is promoted or the client is redirected to the new master.

Verification & Guardrails

  • Promoting a replica with REPLICAOF NO ONE is irreversible for that node and can cause data loss if the old master still has unreplicated writes.
  • If using Redis Sentinel or a managed service, run a proper failover command instead of manual promotion.
  • Verify the new master's replication offset with INFO replication to ensure it is caught up before promoting.

Have a custom or uncategorized crash?

Run your trace through our in-memory client privacy sandbox for instant SRE remediation.

Open Diagnostic Studio