一個redis由於關閉快照沒法鏈接的BUG

[2018-04-19 11:00:08,587: ERROR/MainProcess] consumer: Cannot connect to redis://127.0.0.1:6379/0: 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..
Trying again in 2.00 seconds...redis

Redis被配置爲保存數據庫快照,但它目前不能持久化到硬盤。用來修改集合數據的命令不能用。請查看Redis日誌的詳細錯誤信息。
緣由:
強制關閉Redis快照致使不能持久化。數據庫

解決方案:
運行config set stop-writes-on-bgsave-error no 命令後,關閉配置項stop-writes-on-bgsave-error解決該問題。
root@ubuntu:/usr/local/redis/bin# ./redis-cli
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK
127.0.0.1:6379> lpush myColour "red"
(integer) 1ubuntu

相關文章
相關標籤/搜索