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). Please check the Redis logs for details about the RDB error
redis报这个错 我这边用的docker 发现了两种要做的方案
1. 修改内核 tcp 最大链接((1)请确保你的docker启动给了privileger权限不然改不了内核参数,(2)确保/usr/sbin/init这种启动方式)
eg: 启动docker 参考我的指令
docker run -itd --privileged --name nn_php_nginx -v /home/vagrant/code:/code -v /etc/localtime:/etc/localtime:ro -p 80:80 nn_php_nginx:1.8 /usr/sbin/init
开始修改tcp 监听队列最大长度内核参数 参考 --(https://blog.csdn.net/ghostyusheng/article/details/80434396)
修改somaxconn
在/etc/sysctl.conf中添加如下
net.core.somaxconn = 2048
然后在终端中执行
sysctl -p
2.修改redis 快照问题
命令行修改:
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
文件修改:
打开redis-server配置的redis.conf文件,找到stop-writes-on-bgsave-error,把yes设置为no。