redis保存数据出错怎么办

702
2021/1/29 11:27:24
栏目: 云计算
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

redis保存数据出错处理方法:在/etc/sysctl.conf配置文件中,添加:“vm.overcommit_memory = 1”,保存配置,重启redis即可。

redis保存数据出错怎么办

redis保存数据出错的解决方法:

问题: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.”

解决方法:

在/etc/sysctl.conf配置文件中,添加:“vm.overcommit_memory = 1”,保存配置,重启redis即可。


辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读: 怎么使用redis消息队列