DBAtlas · Database operations atlas

Diagnose RDB/AOF error state, fork time and the cause of MISCONF

RedisPersistence

Command

INFO persistence
# Critical fields: rdb_last_bgsave_status, aof_last_bgrewrite_status, aof_last_write_status, rdb_changes_since_last_save, aof_delayed_fsync
INFO stats
# latest_fork_usec: duration of the last fork (microseconds), total_forks
CONFIG GET stop-writes-on-bgsave-error
CONFIG GET dir
CONFIG GET appendfsync

What it does

Shows whether the last RDB snapshot and AOF rewrite/write succeeded, how many keys changed since the last save, the delayed fsync count and the fork duration.

When to use it

When the application gets 'MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk', BGSAVE/BGREWRITEAOF fails, or fork-related latency is seen.

Caution

With stop-writes-on-bgsave-error yes (default), all writes are rejected after a failed BGSAVE. Silencing the error by setting it to 'no' hides the risk of data loss; fix the cause first: disk full, no write permission on dir, or fork cannot get memory (vm.overcommit_memory=0). Fork time can reach hundreds of milliseconds on a large dataset, and Redis does not respond during that time.

Open in DBAtlas →

Related