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

The Redis replica is in read-only mode, and write operations are not permitted.
  1. Connect to the Redis instance and run INFO REPLICATION to identify if the current instance is a replica and to find the master's address.
  2. Execute ROLE to confirm the instance's role (it should return slave if it's a read-only replica).
  3. If the instance is indeed a replica, switch your connection to the master instance for write operations using the master's address obtained from step 1.
  4. If write operations are necessary on the current instance and assuming you have the required permissions, run SLAVEOF NO ONE to promote the replica to a master. This action should be taken with caution and ideally, after consulting with a Redis administrator or after thoroughly understanding the implications.

Master

Redis

in Minutes — Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

Redis

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid