ERR Background append only file rewriting already in progress: AOF rewrite already in progress(AOF 重写已在进行中)
Redis含义
尝试启动 AOF(Append Only File)重写(BGREWRITEAOF),但已有 AOF 重写正在进行。两个 AOF 重写不能同时运行。
原因
在之前的 BGREWRITEAOF(手动,或由 auto-aof-rewrite-percentage 自动触发)仍在运行时到达了新的重写请求。在大数据集上,AOF 重写可能耗时较长,从而导致这种冲突。
解决方法
等待正在运行的重写完成;关注 INFO persistence 输出中的 aof_rewrite_in_progress 字段。如果操作正在正常运行,不要再发送请求。如果冲突频繁,检查自动重写阈值(auto-aof-rewrite-percentage/min-size)和磁盘 I/O 性能。
同一数据库的其他条目
- ERR Number of keys can't be greater than number of argsEVAL/EVALSHA: numkeys exceeds argument count(EVAL/EVALSHA:numkeys 超过参数数量)
- ERR WATCH inside MULTI is not allowedWATCH inside MULTI is not allowed(不允许在 MULTI 中使用 WATCH)
- ERR WAIT cannot be used with replica instancesWAIT cannot be used with replica instances(WAIT 不能用于副本实例)
- IOERR error or timeout reading from target instanceMIGRATE: I/O error or timeout to target(MIGRATE:与目标之间发生 I/O 错误或超时)
- ERR Error compiling script (new function)Error compiling Lua script(编译 Lua 脚本出错)
- ERR FAILOVER requires connected replicas.FAILOVER requires connected replicas(FAILOVER 需要已连接的副本)
- ERR invalid expire time in 'set' commandinvalid expire time in SET(SET 中的过期时间无效)