redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots
Posted 流云赋雪
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots相关的知识,希望对你有一定的参考价值。
今天运行项目,redis突然出现以下问题:
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日志,如下:
如上大致意思是=>警告:过量使用内存设置为0!在低内存环境下,后台保存可能失败。为了修正这个问题,请在/etc/sysctl.conf 添加一项 \'vm.overcommit_memory = 1\' ,然后重启(或者运行命令\'sysctl vm.overcommit_memory=1\' )使其生效。
然后按照日志提示解决:
重启redis,之后问题解决
以上是关于redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots的主要内容,如果未能解决你的问题,请参考以下文章