强制 pkill redis 后,flushdb 命令报错的解决办法

来源:互联网 发布:妍霓丝黄金水知乎 编辑:程序博客网 时间:2024/05/29 04:17
强制 pkill redis 后,flushdb 命令报错的解决办法
(error) 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.


大意为:(错误)misconf redis被配置以保存数据库快照,但misconf redis目前不能在硬盘上持久化。用来修改数据集合的命令不能用,请使用日志的错误详细信息。


这是由于强制停止redis快照,不能持久化引起的,运行info命令查看redis快照的状态,如下:



解决方案如下:


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


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