1. 程式人生 > >Redis錯誤:(error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able...

Redis錯誤:(error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able...

今天執行redis命令:move key22 2 時,報如下錯誤:

(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.
中文解釋:

Redis被配置為儲存資料庫快照,但它目前不能持久化到硬碟。用來修改集合資料的命令不能用。請檢視Redis日誌的詳細錯誤資訊。

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

解決方案:

將stop-writes-on-bgsave-error設定為no

命令如下:

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