redis 存储失败的情况记录

Redis 安装、部署简单,但是当数据量比较大的情况下,会出现各种问题,以下问题主要是出现在 key count > 2kw 的情况

 

1. Redis “MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk”,问题的原因是系统内存已经被耗尽,导致数据保存失败。日志中会出现以下提示消息:

“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.”(警告:过量使用内存设置为0!在低内存环境下,后台保存可能失败。为了修正这个问题,请在/etc/sysctl.conf 添加一项 'vm.overcommit_memory = 1' ,然后重启(或者运行命令'sysctl vm.overcommit_memory=1' )使其生效。

 至于为什么需要设置 vm.overcommit_memory=1,参考文章 "redis overcommit memory (oom) 问题解决" 以及 "how-does-vm-overcommit-memory-work" 后大致明白了其含义。

 

参考文章:

  1. Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk"问题的解决(转),点击访问

转载于:https://www.cnblogs.com/odirus/p/6377127.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值