zoukankan      html  css  js  c++  java
  • 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"问题的解决(转),点击访问
  • 相关阅读:
    iOS--异步下载
    linux搭建ftp服务器
    hexo常用命令
    Markdown入门
    Markdown 语法和 MWeb 写作使用说明
    vi/vim
    微信聊天机器人
    .vimrc
    配置双机
    python学习笔记(一)
  • 原文地址:https://www.cnblogs.com/odirus/p/6377127.html
Copyright © 2011-2022 走看看