記錄一次處理redis異常的文章

拋出異常是這個樣子的:

edis.exceptions.ResponseError: 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.

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

好的,來看一下redis的日誌文件,vim /usr/local/redis/var/redis.log 

931:M 23 May 2019 10:56:34.647 # Background saving error
931:M 23 May 2019 10:56:34.747 * 1 changes in 900 seconds. Saving...
931:M 23 May 2019 10:56:34.755 * Background saving started by pid 23534
23534:C 23 May 2019 10:56:39.787 # Write error saving DB on disk: No space left on device

提示:保存數據庫時,在磁盤上寫入錯誤,設備上沒有剩餘空間,

我們來看一下磁盤使用情況 (系統是centos7)    df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        36G   34G  160M 100% /

原來真的是硬盤滿了,因爲最近在做抓取圖片的工作,看了一下已抓取的圖片,已經下了23G。

最坑的是,看了一下服務器配置是兩塊硬盤,一塊40G,一塊200G, 只掛載了一塊。

好吧,把第二塊硬盤掛載上,遷移圖片, redis恢復正常。

 

 


 

 

 

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