Fractal Techware

Alert runbooks /

RedisRdbLastSaveFailed

Redis tried to write an RDB snapshot in the background and the attempt failed.

   
Severity warning
Source oliver006/redis_exporter 1.50+
Key metric redis_rdb_last_bgsave_status (1 = ok, 0 = last BGSAVE failed)

What it means

INFO persistence reports whether the most recent background save succeeded. The alert fires when it has reported failure for several minutes, meaning Redis also has not managed a successful retry.

Two consequences. Your on-disk snapshot is getting older, so a restart loses more data. And with the default stop-writes-on-bgsave-error yes, Redis refuses write commands with MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk, which is an application outage.

Common causes

First checks

  1. Read persistence status:
    redis-cli -h <host> INFO persistence | grep -E '^(rdb_last_bgsave_status|rdb_bgsave_in_progress|rdb_changes_since_last_save|rdb_last_bgsave_time_sec|rdb_last_cow_size)'
    redis-cli -h <host> LASTSAVE
    

    LASTSAVE is the Unix time of the last successful save; date -d @<ts> makes it readable.

  2. Find the reason in the Redis log:
    kubectl -n <ns> logs <redis-pod> --since=1h | grep -iE 'background saving|fork|can.t save|error'
    
  3. Check where it writes and whether there is space:
    redis-cli -h <host> CONFIG GET dir
    redis-cli -h <host> CONFIG GET dbfilename
    df -h <dir>
    
  4. On the host, check memory overcommit and free memory:
    sysctl vm.overcommit_memory
    free -m
    
  5. See how many writes are unsaved: redis_rdb_changes_since_last_save.

Fixing it

Free or grow the disk, fix directory ownership, or reset dir to a valid path, then trigger redis-cli BGSAVE and confirm the status returns to ok. For fork failures, set vm.overcommit_memory = 1 on the host (the Redis documentation recommends it) and leave memory headroom above the dataset. If writes are blocked and you need them back immediately, CONFIG SET stop-writes-on-bgsave-error no is a temporary bypass, not a fix.