Redis連接錯誤:MISCONF Redis is configured to save RDB snapshots...

Redis問題
MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error..
Redis被配置爲保存數據庫快照,但它目前不能持久化到硬盤。用來修改數據的命令被禁用了,因爲目前實例配置是當寫數據時快照失敗了去報告錯誤。請查看Redis日誌的詳細錯誤信息。

引發原因
強制關閉Redis快照導致不能持久化。 

兩種修改方法:

1. 通過redis命令行修改

命令行修改示例:

127.0.0.1:6379> config set stop-writes-on-bgsave-error no

2. 修改redis.conf配置文件

vi打開redis-server配置的redis.conf文件,然後使用快捷匹配模式:/stop-writes-on-bgsave-error定位到stop-writes-on-bgsave-error字符串所在位置,接着把後面的yes設置爲no就可以了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章