Redis錯誤解決:(error) MISCONF Redis is configured to save RDB snapshots


剛開始學習使用redis數據庫,在執行刪除命令時,提示了我這么一個錯誤:

錯誤提示

(error) 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.

大意是:
(錯誤)misconf redis配置為保存RDB快照,但它當前無法在磁盤上持久。可以修改數據集的命令被禁用,因為此實例被配置為在RDB快照失敗時報告寫入過程中的錯誤(在bgsave錯誤選項上停止寫入)。有關RDB錯誤的詳細信息,請查看redis日志。
View Code

根據錯誤提示可以大致判斷是快照的問題引起的,使用info命令查看一下:

解決方案

1 127.0.0.1:6379> CONFIG SET stop-writes-on-bgsave-error no

該命令的作用是關閉stop-writes-on-bgsave-error選項,這樣這個問題就可以解決掉了。


免責聲明!

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



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