ERR Background append only file rewriting already in progress: AOF rewrite already in progress
RedisWhat does it mean?
An attempt was made to start an AOF (Append Only File) rewrite (BGREWRITEAOF), but an AOF rewrite is already in progress. Two AOF rewrites cannot run at the same time.
Why does it happen?
A new rewrite request arrived while a previous BGREWRITEAOF (manual, or automatic via the auto-aof-rewrite-percentage trigger) was still running. On large datasets an AOF rewrite can take a long time and lead to this conflict.
How to fix it
Wait for the running rewrite to finish; watch the aof_rewrite_in_progress field in INFO persistence output. If the operation is legitimately running, do not send another request. If conflicts are frequent, review the automatic rewrite thresholds (auto-aof-rewrite-percentage/min-size) and disk I/O performance.
More from this engine
- ERR Number of keys can't be greater than number of argsEVAL/EVALSHA: numkeys exceeds argument count
- ERR WATCH inside MULTI is not allowedWATCH inside MULTI is not allowed
- ERR WAIT cannot be used with replica instancesWAIT cannot be used with replica instances
- IOERR error or timeout reading from target instanceMIGRATE: I/O error or timeout to target
- ERR Error compiling script (new function)Error compiling Lua script
- ERR FAILOVER requires connected replicas.FAILOVER requires connected replicas
- ERR invalid expire time in 'set' commandinvalid expire time in SET