测服报错信息:
Caused by: redis.clients.jedis.exceptions.JedisDataException:
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使用RDB进行持久化,但是现在RDB快照时失败了;因为开启了stop-writes-on-bgsave-error选项,RDB失败之后就禁止执行修改数据的命令了。Jedis等客户端连接时就会报上述错误。
查看redis服务器的日志:
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
日志显示:overcommit_memory被设置成0,redis后台的保存操作在低可用内存的情况下会失败。这个时候很清楚