Redis replica stops applying updates after RDB mismatch during background save (BGSAVE)
Environment
Standalone Redis master (v6.2) and a chained replica on different physical host; master configured for AOF disabled, RDB snapshotting enabled (save 900 1). Replica connects as standard replica, persistent storage on both nodes is ext4 local disk.
Symptoms
Replica connects and syncs initially, then after the master performs a BGSAVE the replica reports replication lag growing and commands stop appearing on replica. Master continues to accept writes. Replica logs show 'Replication backlog error' followed by 'RDB file checksum mismatch' and replication enters partial-resync failure; replication only resumes after manually restarting the replica redis-server.
Observations
- Master redis log contains 'Background saving terminated by signal 9' around the time of the issue. - Replica redis log shows 'Short read or RDB mismatch' and later 'Failed to load RDB'. - The master's dump.rdb exists but at times was observed sized 0 or truncated before BGSAVE termination. - Disk SMART and system logs show no clear disk I/O errors; however at one observed incident the master had automated periodic filesystem snapshot (LVM snapshot) triggered during BGSAVE. - Reproducing a BGSAVE while monitoring showed master spawn child write to dump.rdb; if an interruption occurs (OOM kill, signal), child terminates leaving truncated file.
Already attempted
- Restarted replica to force full resync (worked temporarily). - Disabled scheduled LVM snapshots during a test window; triggered manual BGSAVE repeatedly — when no snapshot coincided, issue did not occur. - Increased ulimit for Redis process and monitored for OOM or SIGKILL — no clear OOM on master. - Moved dump.rdb to another disk on master (faster) temporarily and BGSAVE completed successfully during tests.
Question
What are the likely causes for the RDB write to be interrupted or corrupted on the master causing the replica to report an RDB checksum mismatch and stop applying updates? What safe, reversible mitigations can I apply to avoid replication stalls without losing data?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags