ERR Background append only file rewriting already in progress: AOF rewrite already in progress
Redis의미
AOF(Append Only File) rewrite(BGREWRITEAOF)를 시작하려 했지만 이미 AOF rewrite가 진행 중이다. 두 개의 AOF rewrite를 동시에 실행할 수 없다.
원인
이전 BGREWRITEAOF(수동 또는 auto-aof-rewrite-percentage 트리거에 의한 자동)가 아직 실행 중일 때 새 rewrite 요청이 도착했다. 큰 데이터셋에서는 AOF rewrite가 오래 걸려 이런 충돌이 생길 수 있다.
해결 방법
실행 중인 rewrite가 끝날 때까지 기다린다. INFO persistence 출력의 aof_rewrite_in_progress 필드를 확인한다. 작업이 정상적으로 실행 중이라면 다른 요청을 보내지 않는다. 충돌이 잦다면 자동 rewrite 임계값(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 (numkeys가 인수 개수를 초과)
- 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 (replica 인스턴스에서는 WAIT 사용 불가)
- 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