今天搭建完测试服务器部署web项目的时候登录的时候报错:
连接Redis报错:
MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option)
查了一小圈在此记录一下:
报错原因是:redis快照被强制关闭了导致不能持久化的问题
解决办法:通过stop-writes-on-bgsave-error值设置为no即可避免这种问题
1、命令修改:
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
然后重启redis-server
2、修改redis.conf:
# 把原来的 yes 改成 no
# stop-writes-on-bgsave-error yes
stop-writes-on-bgsave-error yes
# 然后重启redis-server
网友评论