在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
本文介绍了一种在使用Redis作为缓存时遇到的错误:Redis配置为保存RDB快照,但无法在磁盘上持久化。文章提供了解决方案,通过关闭stop-writes-on-bgsave-error配置项来解决该问题。

1万+

被折叠的 条评论
为什么被折叠?



