Redis报错MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on

2023-05-25编程技术14999

1.错误信息

org.redisson.client.RedisException: 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.. channel: [id: 0x1ede2079, L:/127.0.0.1:47886 -
R:localhost/127.0.0.1:6379] command: (PSETEX), params: [APPT_AUTH_START, 86400000,
PooledUnsafeDirectByteBuf(ridx: 0, widx: 13, cap: 256)]
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:371)
at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:215)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:153)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:122)

保存RDB快照,但当前无法持久保存在磁盘上。可能修改数据集的命令被禁用。
错误原因

    强制把redis快照关闭了导致不能持久化。
    项目开启了snapshot的持久化模式,且存在大量写入的时候bgsave持久化异常,导致客户端写入数据失败。

解决
设置参数stop-writes-on-bgsave-error为no,也即bgsave异常的时候不要阻止继续写入数据。
通过命令设置:

#进入redis
redis-cli -h 127.0.0.1 -p 6379
config set stop-writes-on-bgsave-error no

修改redis.conf文件

vim打开redis.conf
快速定位 /stop-writes-on-bgsave-error 把es设置为no

Redis报错MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on的相关教程结束。

本文地址:https://www.ufcn.cn/tutorials/2671963.html

如非特殊说明,本站内容均来自于网友自主分享,概不代表本站观点,如有任何问题我们都将在收到反馈后的第一时间进行处理!