【redis】redis异常-MISCONF Redis is configured to save RDB snapshots

使用redis报错:

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.; 

nested exception is redis.clients.jedis.exceptions.JedisDataException:     
    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.

原因分析和解决方案:

1. 命令被禁止,查看redis log日志

解决方案:

在redis-cli连接到服务器后执行以下命令:

config set stop-writes-on-bgsave-error no

2. 磁盘空间已满,bgsave快照备份失败

解决方案:

查看磁盘是否已满

df -a

 

查看某文件夹下那些文件占用数据最大,没用的数据进行备份或者删除清理

du -sh *

 

posted @ 2023-06-13 09:37  xiexie0812  阅读(1100)  评论(0编辑  收藏  举报