运行时报错:
server error [ErrorReply: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails
原因:不能写入数据到磁盘文件。
第一种可能磁盘不足
解决方案:扩展磁盘
第二种一切资源正常情况下,可能文件路径指定错误
解决方案:重新配置启动一次 redis,
ps aux | grep -v grep | grep redis >> kill
非正常做法(可能会导致问题一直存在,还不容易发现)
网络答案:1. save "" 2. stop-writes-on-bgsave-error no 3. vm.overcommit_memory = 1
参考链接: