当前位置:Gxlcms > 数据库问题 > MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk

时间:2021-07-01 10:21:17 帮助过:5人阅读

  •   
  • To have if after reboot add this line to /etc/sysctl.cnf:  
  •   
  • vm.overcommit_memory=1  
  • 修改vm.overcommit_memory=1后问题果然解决了。

    为什么系统明明还剩2GB的内存,Redis会说内存不够呢?

    网上查了一下,有人也遇到类似的问题,并且给出了很好的分析(详见:http://www.linuxidc.com/Linux/2012-07/66079.htm),简单地说:Redis在保存数据到硬盘时为了避免主进程假死,需要Fork一份主进程,然后在Fork进程内完成数据保存到硬盘的操作,如果主进程使用了4GB的内存,Fork子进程的时候需要额外的4GB,此时内存就不够了,Fork失败,进而数据保存硬盘也失败了。

    MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk

    标签:一个   左右   database   bigger   under   存储   inux   enable   避免   

    人气教程排行