Redis 报错:MISCONF Redis is configured to save RDB snapshots

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.

配置优化,添加以下配置项到/etc/sysctl.conf配置文件:

vm.overcommit_memory = 1

执行以下命令使其实时生效:

sysctl vm.overcommit_memory=1

如果Redis缓存的为非重要数据,如网页缓存,对可用性要求不高,可以修改Redis的配置文件如下:

stop-writes-on-bgsave-error no

如果缓存数据丢失也可以接受,可以关闭appendonly

appendonly no

Stackoverflow:https://stackoverflow.com/questions/19581059/misconf-redis-is-configured-to-save-rdb-snapshots
Redis Persistence:https://redis.io/topics/persistence

posted @ 2019-02-26 14:10  隔壁老王python  阅读(...)  评论(...编辑  收藏