About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A write command fails with MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Redis is protecting you: snapshots are switched on, the last background save failed, and by default Redis then stops accepting writes so that nobody carries on unaware that nothing is reaching disk. Fix the reason the save fails (a full or unwritable disk, a failed fork, or a killed save process) and writes resume by themselves after the next successful save.
What the error means
In the Redis 8.0 source, the full error text is: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
The server rejects a command with this MISCONF error when all three of these are true: stop-writes-on-bgsave-error is on, at least one save point is configured, and the last background save ended in an error. The command is rejected if it is a write command, and a PING is rejected too. Read-only commands still work.
The redis.conf file shipped with Redis says: "By default Redis will stop accepting writes if RDB snapshots are enabled (at least one save point) and the latest background save failed." It also says that if the background saving process starts working again, Redis will automatically allow writes again, and that the option can be switched off if you have proper monitoring of the server and its persistence. The default is stop-writes-on-bgsave-error yes. The default save points are 3,600 seconds if at least 1 change was made, 300 seconds if at least 100 changes, and 60 seconds if at least 10,000 changes.
How a snapshot is made, from the Redis persistence page: Redis forks, the child writes the dataset to a temporary RDB file, and when it finishes the new file replaces the old one. So a snapshot can fail at three points: the fork, the creation or writing of the temporary file, and the child process finishing without error.
A different message with the same word appears if the append-only file fails: MISCONF Errors writing to the AOF file: followed by the system error text. The checks below are for the RDB case.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The disk or filesystem holding the Redis working directory is full | The log line Write error while saving DB to the disk followed by the system error, such as no space left (a temp file that cannot be created at all gives Failed opening the temp RDB file; a failed rename gives Error moving temp DB file) |
df -h on the working directory; INFO persistence shows rdb_last_bgsave_status:err |
| The Redis user cannot write to the working directory | The log line Failed opening the temp RDB file followed by the system error text, such as permission denied |
ls -ld on the directory against the user running Redis |
| The directory is on a read-only filesystem | The same temp file error | CONFIG GET dir, then check the mount |
fork() fails (not enough memory for the child) |
The log line Can't save in background: fork: followed by the system error |
vm.overcommit_memory is 0 and free memory is smaller than the dataset |
| The save child was killed | The log line Background saving terminated by signal followed by a signal number |
The system log for a kernel out-of-memory kill |
| The save child exited with an error | The log line Background saving error |
Redis log lines just before it |
Prove the cause before changing anything
All of these are read-only.
1. Confirm the state.
redis-cli INFO persistence
The Redis INFO page describes rdb_last_bgsave_status as the status of the last RDB save operation, and rdb_last_save_time as the epoch timestamp of the last successful RDB save. In the 8.0 source the field reads ok or err. A good result is ok; err confirms the snapshot is the reason for the error.
2. Read the Redis log. The error message tells you to do this, and the source writes the reason into the log with warnings such as Failed opening the temp RDB file, Write error while saving DB to the disk, Error moving temp DB file, Can't save in background: fork:, Background saving error and Background saving terminated by signal. The log path is whatever your redis.conf or service unit sets; check the logfile setting in redis.conf or the service unit file.
3. Find the working directory and file name.
redis-cli CONFIG GET dir
redis-cli CONFIG GET dbfilename
The persistence page says by default Redis saves snapshots in a binary file called dump.rdb. CONFIG GET reads the effective values of configuration parameters.
4. Check space and permissions where Redis writes. Use the directory from step 3:
df -h /var/lib/redis
ls -ld /var/lib/redis
Replace the path with your dir value. df -h prints sizes in powers of 1024, in a human-readable form.
5. If the log shows a fork failure, read the memory setting.
cat /proc/sys/vm/overcommit_memory
The Redis FAQ explains that if overcommit_memory is 0, the fork fails unless there is as much free RAM as needed to duplicate all of the parent's memory pages; its example is a 3 GB dataset with only 2 GB of free memory.
Fix
Disk full. Find what is using the space without deleting anything yet:
du -h -x -d 1 /var/lib
-x stays on one filesystem and -d 1 limits the depth to one level.
Select the exact files first: list the suspect directory with sizes (for example ls -lh /var/log/myapp/, using your own path) and agree the list of exact paths with the owner of those files.
Save first: copy any file you are not certain about to a filesystem that has room (for example cp -p /var/log/myapp/old.log /mnt/spare/old.log, using your own paths).
Risk: removing data to free space cannot be undone. Back-out: copy the saved file back to its original path. A file removed without a saved copy cannot be restored, so grow the filesystem instead if you cannot copy.
Free space by removing data you can prove is not needed, or grow the filesystem. Remove only the exact paths on the agreed list, one path at a time and never with a wildcard. Do not delete dump.rdb while it is your only copy.
Risk: triggering a save with BGSAVE forks the Redis process, which can briefly raise memory use because of copy-on-write, and writes a new RDB file. The Redis page says an error is returned if a background save is already running. Back-out: none needed; a successful save replaces the old file only after the new one is complete.
Once there is room, trigger a save:
redis-cli BGSAVE
Directory not writable. Print the owner and mode first with ls -ld and record them so you can restore them.
Risk: making the Redis directory writable means changing its owner or mode, which can lock out Redis or other services that use it. Back-out: restore the owner and mode you recorded from the ls -ld output.
Make the directory writable by the account that runs redis-server, using your platform's tools. Then run BGSAVE as above.
Fork failure. The Redis administration page recommends setting the Linux kernel overcommit memory setting to 1: add vm.overcommit_memory = 1 to /etc/sysctl.conf, then reboot or run sysctl vm.overcommit_memory=1 to activate it. Save first:
cat /proc/sys/vm/overcommit_memory
cp -p /etc/sysctl.conf /etc/sysctl.conf.2026-11-20.bak
Risk: this is a system-wide kernel setting, not a Redis setting. The Redis FAQ says that setting it to 1 tells Linux to perform the fork in a more optimistic allocation fashion, and the kernel setting applies to every process on the host. Back-out: run sysctl vm.overcommit_memory= followed by the value you printed, then copy /etc/sysctl.conf.2026-11-20.bak back over /etc/sysctl.conf and read it back.
Add the line vm.overcommit_memory = 1 to /etc/sysctl.conf. /etc/sysctl.conf is a Linux file, so Redis has no check for it; read the file back after editing it. Then activate the setting:
sysctl vm.overcommit_memory=1
Child killed by a signal. That points to the kernel's out-of-memory killer or another process killing the child. See Linux OOM Killer on a VM: Find the Cause, Set Memory Limits, then reduce Redis memory or add RAM.
Last resort: let Redis accept writes without snapshots. The redis.conf text allows switching the option off if you have monitoring in place. Print the current value first:
redis-cli CONFIG GET stop-writes-on-bgsave-error
Risk: writes continue while nothing is being saved; a crash or restart loses everything since the last good snapshot. Back-out: redis-cli CONFIG SET stop-writes-on-bgsave-error yes (or the value you printed). The setting is modifiable at runtime in the 8.0 source, but a runtime change is not kept after a restart unless you write it to redis.conf; the CONFIG REWRITE page describes how Redis rewrites that file.
redis-cli CONFIG SET stop-writes-on-bgsave-error no
Example (illustrative): on cache01, an application reports MISCONF Redis is configured to save RDB snapshots at 02:10. redis-cli INFO persistence shows rdb_last_bgsave_status:err. CONFIG GET dir returns /var/lib/redis; df -h /var/lib/redis shows the filesystem at 100%. du -h -x -d 1 /var/lib shows an old application log directory using most of the space. The administrator lists the exact log files, confirms with the application owner that they are not needed, copies one to a spare filesystem, removes the agreed files, runs redis-cli BGSAVE, and watches rdb_last_bgsave_status return to ok. Writes work again. No Redis setting was changed.
Confirm the fix
Run redis-cli INFO persistence again: rdb_last_bgsave_status should be ok and rdb_last_save_time should be recent (compare it to the current epoch time). Try a harmless write to a test key, then delete that key. Confirm the Redis log shows Background saving terminated with success.
What to watch afterwards
rdb_last_bgsave_statusandrdb_last_save_timein monitoring, so a failed save is noticed before writes stop.- Free space on the filesystem holding
dir; a snapshot needs room for a complete new file while the old one still exists. - Redis memory growth against the host's RAM, since snapshotting forks the process.
- Any change that turns off
stop-writes-on-bgsave-error; it should have an alert on failed saves.
Read next
Related articles you may want next.
- Backup & RecoveryRedis backups: RDB snapshots, the append-only file and what a restore really gives youHow Redis persistence works for backup: RDB snapshots, the append-only file, safe copying, newer backup commands, replication risks and restore checks.Read article
- TroubleshootingRedis OOM command not allowed when used memory > 'maxmemory'Redis OOM command not allowed when used memory > 'maxmemory': read INFO memory, pick the right eviction policy, set TTLs or raise the limit safely.Read article
- TroubleshootingLinux Says No Space Left but Bytes Are Free: Check Inodes and QuotasDistinguish inode exhaustion, quota limits and checking the wrong mount before any cleanup.Read article
Risks and limits
Behaviour and wording come from the Redis 8.0 source and the redis.io documentation listed under Sources. Older Redis versions may word the message slightly differently. Switching off stop-writes-on-bgsave-error trades safety for availability. Snapshots are one part of a backup design; see Redis backups: RDB snapshots, the append-only file and what a restore really gives you. These commands have not been run or lab-tested.
Sources
- server.c, Redis 8.0 branch (MISCONF and OOM messages, write-denial conditions) — Redis source on GitHub, no date shown, accessed 20 November 2026
- rdb.c, Redis 8.0 branch (RDB log messages) — Redis source on GitHub, no date shown, accessed 20 November 2026
- config.c, Redis 8.0 branch (runtime-modifiable settings) — Redis source on GitHub, no date shown, accessed 20 November 2026
- redis.conf, Redis 8.0 branch — Redis, no date shown, accessed 20 November 2026
- Redis persistence — Redis documentation, no date shown, accessed 20 November 2026
- INFO — Redis documentation, no date shown, accessed 20 November 2026
- BGSAVE — Redis documentation, no date shown, accessed 20 November 2026
- CONFIG GET — Redis documentation, no date shown, accessed 20 November 2026
- CONFIG SET — Redis documentation, no date shown, accessed 20 November 2026
- CONFIG REWRITE — Redis documentation, no date shown, accessed 20 November 2026
- Redis FAQ — Redis documentation, no date shown, accessed 20 November 2026
- Redis CLI — Redis documentation, no date shown, accessed 20 November 2026
- Redis administration — Redis documentation, no date shown, accessed 20 November 2026
- df(1) — Linux man-pages project, GNU coreutils 9.11, April 2026, accessed 20 November 2026
- du(1) — Linux man-pages project, GNU coreutils 9.11, April 2026, accessed 20 November 2026
- ls(1) — Linux man-pages project, GNU coreutils 9.11, April 2026, accessed 20 November 2026
This article was originally published on .