成功解决redis.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.问题
翻译:

Redis被配置为保存RDB快照,但它目前不能持久保存在磁盘上。可能修改数据集的命令被禁用,

因为该实例被配置为在RDB快照失败时报告写入错误(stop-writes-on-bgsave-error选项)。有关RDB的详细信息,请查看Redis日志

错误。

解决:

不能持久化的问题,在网上查了一些相关解决方案。

通过stop-writes-on-bgsave-error值设置为no即可避免这种问题。

解决一:

一种是通过redis命令行修改,这种方式方便,直接,更改后直接生效,解决问题。

命令行修改方式示例:

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

在这里插入图片描述

解决二:

直接修改redis.conf配置文件,但是更改后需要重启redis。

修改redis.conf文件:

(1)vim打开redis-server配置的redis.conf文件,

(2)使用快捷匹配模式:

/ stop-writes-on-bgsave-error定位到stop-writes-on-bgsave-error字符串所在位置,

(3)把后面的yes设置为no。

如果以上两种方法方法都解决不了

还有一个可能就是内存不足

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐