redis报错: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挂掉报错,查看redis不能持久化到硬盘。百度解决方案,https://www.jianshu.com/p/3aaf21dd34d6,
原因:强制关闭redis快照导致不能持久化。
解决方案:
将stop-writes-on-bgsave-error设置为no。
两种方式:
第一种,登录redis,命令行调整:
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
第二种:redis.config中调整参数stop-writes-on-bgsave-error值为no。
如上调整不太好,参考https://www.cnblogs.com/qq78292959/p/3994349.html,修改
- sysctl vm.overcommit_memory=1
即可。
127
.0
.0
.1
:6379
>
config
set
stop-writes-on-bgsave-error
no