Unhandled promise rejection (rejection id: 764): ReplyError: MISCONF Redis is configured to save RDB

nodejs项目,redis报错完整内容:

Unhandled promise rejection (rejection id: 764): ReplyError: 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数据库是又爱又恨,经历过大量数据丢失,最近又一直报这个错误。

最后在网上找到了方法:

服务器是在linux下,

1、修改redis/redis.conf,搜索stop-writes-on-bgsave-error 把yes改为no;

2、修改 /etc/sysctl.cnf 文件,添加:vm.overcommit_memory=1

参考:

https://www.linuxidc.com/Linux/2012-07/66079.htm


意外金喜的博客:http://blog.csdn.net/zzwwjjdj1

猜你喜欢

转载自blog.csdn.net/zzwwjjdj1/article/details/79620650