Redis replica stops applying updates after RDB mismatch during BGSAVE causing replication gap and growing replication backlog
Environment
Primary Redis 6.2 on Linux performing scheduled BGSAVE during peak load; replica Redis instances on separate hosts connect with replicaof and 'repl-backlog-size' default; one replica now shows a replication gap and reports mismatch on RDB checksum.
Symptoms
Replica reports 'RDB checksum mismatch' and stops applying subsequent replication stream; replication offset diverges and replication backlog grows; reads from replica stale. No other errors on network layer.
Observations
Primary logs show BGSAVE spawned and completed with an RDB file checksum X; replica log shows expected RDB checksum Y and then disconnects. Replica's last-disk snapshot timestamp differs. Attempting PSYNC fails with '-ERR RDB checksum mismatch'.
Already attempted
Tried 'REPLICAOF partial resync' commands, restarted replica, cleared AOF (none in use), attempted to force full sync but PSYNC continues to reject due to checksum mismatch. Finally performed full stop of replica and delete of dump.rdb then restart to force new sync — that triggered a full resync and restored replication but requires replica downtime.
Question
What's the safest way to recover replicas after RDB checksum mismatch without causing data corruption or extended downtime, and how to avoid recurring mismatch during BGSAVE under load?
Verified community troubleshooting
A mismatch usually means the replica's RDB isn't the same as the primary's snapshot. Safest recovery is to stop the replica, delete its dump.rdb (and AOF if you use it), then restart so it pulls a fresh RDB from the primary. Before doing that, check primary dmesg and disk SMART for I/O errors during the BGSAVE time—if the primary’s RDB was corrupted you'll see evidence there and should fix storage first. This approach forces a full resync and is reversible by restoring the deleted files from backup if needed.
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Databases41% match
Redis replica stops applying updates after RDB mismatch during background save (BGSAVE)
Open0 answers - Databases25% match
PostgreSQL logical replication slot grows until disk full after subscriber disconnects during nightly load
Open0 answers - Databases23% match
PostgreSQL replica stops streaming WAL after pg_repack on primary; replication slot reports missing WAL
Open0 answers - Databases22% match
MySQL Replica Reports Binlog Checksum Mismatch After Changing Binlog_Format to ROW on Primary
Open0 answers - Databases22% match
MySQL replica SQL thread stalls with 'Waiting for table metadata lock' after direct ALTER TABLE on primary during peak writes
Open0 answers