django 使用redis 报错 You can't write against a read only replica.

# 进入redis 后修改配置即可, redis 不需要重启, 重启后会失效
redis-cli -h 127.0.0.1 -p 6379
127.0.0.1:6379> config get slave-read-only
1) "slave-read-only"
2) "yes"
127.0.0.1:6379> config set slave-read-only no
OK
127.0.0.1:6379> config get slave-read-only
1) "slave-read-only"
2) "no"
127.0.0.1:6379> 

  

posted @ 2024-01-31 15:42  dontbealarmedimwithy  阅读(153)  评论(0编辑  收藏  举报