少於 1 分鐘閱讀

問題

用sidekiq跑排程,在Redis使用了一段時間後,突然出現以下問題,導致所有排程都暫停

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. Redis被配置為保存數據快照,但它目前不能持久化到硬碟。用來修改集合數據的命令不能使用。請查看Redis紀錄的詳細錯誤訊息。

總而言之就是因為要存快照,但是又因為不明原因存不起來的問題。

解決方式

因為我的Redis只是拿來做排程,資料庫本身並沒有什麼重要資料,乾脆直接取消快照以免再發生此問題

先進入redis-cli命令列,輸入下列設定

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

最後再重啟一下sidekiq,就大功告成

參考

  1. http://stackoverflow.com/questions/19581059/misconf-redis-is-configured-to-save-rdb-snapshots
  2. http://www.jianshu.com/p/3aaf21dd34d6

更新時間:

留言