今天出去吃了个饭,由于长时间没有去访问它(我使用的前台界面运行的,没有后天),连接超时了。回来跑程序发现出现了个问题:
Caused by: io.lettuce.core.RedisCommandExecutionException: 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快照关闭了导致不能持久化的问题
解决办法就是将top-writes-on-bgsave-error值设置为no
一般两种方式
第一种就是使用命令:127.0.0.1:6379> config set stop-writes-on-bgsave-error no
第二种就是:编辑redis.conf进行编辑(使用vi) 将 stop-writes-on-bgsave-error yes 后面的yes改成on
本文介绍了Redis因配置问题无法持久化导致的MISCONF错误。通过调整stop-writes-on-bgsave-error配置项为no来解决该问题。提供了两种解决方法:一是直接使用Redis命令进行配置更改;二是编辑redis.conf文件手动修改。
1万+

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



