Skip to main content
Database & ORM · Developer Error Resolution Lab

Fix Redis 'MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk'

Resolve Redis write-block when memory overcommit is disabled on Linux hosts.

Triggered Error Message:

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled.

# Immediate temporary unlock in redis-cli:
redis-cli config set stop-writes-on-bgsave-error no

# Permanent host kernel fix:
sudo sysctl vm.overcommit_memory=1
echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Root Cause & Mechanism Analysis

Why does this error occur?

Linux kernel memory overcommit (`vm.overcommit_memory`) is set to 0. When Redis forks a background process to write the RDB file, the OS refuses the fork if available RAM is low.

Frequently Asked Questions

Why does Redis need memory overcommit?
Redis uses copy-on-write during `bgsave`. Without overcommit, the OS reserves equal virtual memory, failing even if actual physical memory is sufficient.
Browse All 35 Guides