linux redis自动关闭问题

linux 自动关闭的问题

问题:

redis.clients.jedis.exceptions.JedisDataException: 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.

在网上查很多帖子解决方案:

1,在 /etc/sysctl.conf 添加 ‘vm.overcommit_memory = 1’ ,然后重启
2,启动客户端 启动客户端:
2.1./redis-cli
执行:config set stop-writes-on-bgsave-error no
之前出现的问题这种办法都试了 问题依旧:
最后发现问题:
linux配置在太低 而redis默认开启的是rdb 快照
stop-writes-on-bgsave-error yes 此配置当redis最近一次save操作失败则停止写操作 使redis 再次保存快照失败
使用命令关闭rdb和aof (都是在redis-cli中使用)也可以在配置文件中关闭

config set save ""
config set appendfsync no

通过命令来查看执行结果

config get save
config get appendfsync

最后问题得以解决

你可能感兴趣的:(redis,redis,linux,java)