ResponseError: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persi

在Ubuntu中的一个使用flask框架的项目,使用redis作为缓存.

产生如下错误:
redis.exceptions.ResponseError: 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.exceptions。MISCONF Redis配置为保存RDB快照,但目前无法在磁盘上持久保存。可以修改数据集的命令被禁用。有关错误的详细信息,请查看Redis日志。

这是由于强制停止redis快照,不能持久化引起的,

解决方案如下:

打开redis-cli

运行 config set stop-writes-on-bgsave-error no 命令

关闭配置项stop-writes-on-bgsave-error解决该问题

(flask_py3) python@ubuntu:~/Desktop/news/news_information$ redis-cli
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK

猜你喜欢

转载自blog.csdn.net/Alex1053/article/details/81842156