Redis報錯:redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snap


首先找到出現錯誤的原因:

redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. 
Commands that may modify the data set are disabled.
Please check Redis logs for details about the error.

  misconf redis被配置以保存數據庫快照,但misconf redis目前不能在硬盤上持久化。用來修改數據集合的命令不能用,請使用日志的錯誤詳細信息。

  強制把redis快照關閉了導致不能持久化的問題。運行info命令查看redis快照的狀態,如下:

  

解決方案如下:

1. redis運行 config set stop-writes-on-bgsave-error no 命令

config set stop-writes-on-bgsave-error no 
2.修改redis.conf文件:vi打開redis-server配置的redis.conf文件,然后定位到stop-writes-on-bgsave-error字符串所在位置,接着把后面的yes設置為no即可。
stop-writes-on-bgsave-error no

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM