FULL AI ANALYSIS

Redis replica stops applying updates after RDB mismatch during BGSAVE causing replication gap and growing replication backlog

Generated Oct 18, 2026, 9:45:27 AM

Analysis summary

An RDB checksum mismatch indicates the replica received an RDB that doesn't match the primary's expected checksum—common causes: primary's BGSAVE produced a corrupted/split RDB written mid-rise (e.g., disk IO issues), network corruption during transfer, or replica data leftover causing mismatch on PSYNC. Redis PSYNC compares runid and offset; if mismatch it requires full resync. Safe recovery is to remove the stale dump.rdb on replica to force a fresh copy from primary (as done), but prevention involves ensuring BGSAVE completes atomically (reliable storage, disable aggressive OOM killer), or moving snapshots to reliable disks and enabling fsync protections. Large memory sets or disk saturation can cause partial writes. Consider enabling TLS checksums and monitoring disk I/O and dmesg for errors.

Possible causes

RDB file produced by primary was corrupted during BGSAVE due to disk I/O starvation or kernel OOM killing RDB writer child

70%

Network corruption or intermediary proxy mangled the RDB transfer causing checksum mismatch on replica during replication

35%

Replica had stale dump.rdb or leftover metadata interfering with PSYNC runid/offset negotiation

30%

Redis bug in the specific 6.2 version handling partial resynchronization under concurrent BGSAVE/CLIENT PAUSE interactions

20%

Suggested fixes

1

Diagnostic step 1

To recover safely: stop the replica Redis, remove dump.rdb and appendonly.aof (if present), then start the replica so it triggers a clean full sync from primary (ensure you have backups and that this replica is not the authoritative source).

2

Diagnostic step 2

Check primary dmesg and system logs for IO errors at BGSAVE time and verify disk SMART health; move RDB directory to a reliable filesystem if issues found.

3

Diagnostic step 3

If BGSAVE corruption suspected, schedule saves during low load or enable RDB file atomic write protections (use tmp file rename behavior) and consider upgrading to a Redis version with known fixes.

4

Diagnostic step 4

Monitor repl-backlog and replication offsets and consider using a replica-replace window (take an offline read-only backup) before making changes; escalate to storage vendor if underlying disk errors detected.