VPS Tutorials
Redis MISCONF on a VPS: RDB, Disk Permissions and Fork Memory (2026)
Preserve Redis data, diagnose failed snapshots, repair disk or memory conditions and verify persistence and application writes before restoring protection.

Redis may accept connections and reads while SET, queue insertion or session writes fail with MISCONF Redis is configured to save RDB snapshots. For the RDB form of this error, snapshot saving has failed and Redis is configured to block commands that modify data. Find why saving failed before deleting dump.rdb, recreating a volume or restarting Redis.
This guide covers self-hosted Redis Open Source on Linux, systemd and Docker: identify the error, read state/logs, repair storage or memory conditions, then verify persistence and application writes. Managed services require their platform's persistence and administration procedures.
| Error | Investigate |
|---|---|
| MISCONF mentions RDB snapshots and inability to persist | Snapshot failure and stop-writes-on-bgsave-error |
| MISCONF mentions AOF writing | AOF storage/path/status; the RDB protection switch is insufficient |
OOM command not allowed | Memory quota such as maxmemory and eviction policy |
READONLY | Replica connection or role change |
NOAUTH, NOPERM | Authentication or ACL |
| Refused connection/timeout | Address, listener, networking or service |
The focus here is failed RDB saving; see the Redis MISCONF FAQ. If commands never reach Redis, start with connection/startup troubleshooting.
Save the full error, time and logs. Reduce nonessential writes/retries to limit load. In-memory data may be newer than the last successful persistence file; an immediate restart can lose those changes.
Use an existing administration account. Replace these example credentials, address and port:
redis-cli --user admin --askpass -h 127.0.0.1 -p 6379
--askpass prompts for the password, keeping it out of arguments/screenshots. For TLS, use the correct TLS and trusted-CA options. Keep port 6379 off the public Internet. See Redis CLI options.
Blocks labeled redis run in that interactive session; blocks labeled bash run in the VPS shell. First read the state:
INFO server
INFO replication
INFO persistence
INFO memory
CONFIG GET dir
CONFIG GET dbfilename
CONFIG GET save
CONFIG GET appendonly
CONFIG GET stop-writes-on-bgsave-error
Confirm version, instance, role and actual persistence directory. Application accounts may lack CONFIG or diagnostic privileges: use the established administration interface rather than granting all management commands. Record existing protection and persistence settings.
CONFIG GET dir reports the path seen by Redis. Container /data is not host /data; find the mount before inspecting the filesystem.
In INFO persistence, inspect:
rdb_last_bgsave_status: latest RDB-save status.rdb_bgsave_in_progress: whether a background save is running.rdb_last_save_time: last successful save time.rdb_changes_since_last_save: changes since saving.- With AOF enabled,
aof_last_write_status,aof_last_bgrewrite_statusand in-progress states separately.
See INFO field definitions. Working reads, an old dump.rdb or enabled AOF do not prove current persistence succeeds.
For systemd, inspect the actual service:
sudo journalctl -u redis-server --since "30 minutes ago" --no-pager
Replace redis-server if its name differs. For Docker:
docker logs --since 30m redis
Replace redis with the actual container. Locate the earliest persistence failure near the incident, rather than only repeated application MISCONF messages:
| Log evidence | Priority |
|---|---|
No space left on device | Space, inodes and storage quotas |
Permission denied | Runtime identity, directory permissions, mounts and service sandbox |
Read-only file system | Read-only mount, filesystem failure or storage policy |
Messages such as fork: Cannot allocate memory | Memory headroom, overcommit and container limits |
| RDB child terminated by a signal/OOM logs | Memory peaks during writes and process killing |
| Temporary-file creation/rename failure | Writable directory, target filesystem and exact error |
For a system service whose real host directory is /var/lib/redis:
df -h /var/lib/redis
df -i /var/lib/redis
findmnt -T /var/lib/redis
ls -ld /var/lib/redis
Replace it with the verified host path. Free capacity in df -h does not prevent exhausted inodes or a user/storage quota from blocking writes.
Background RDB saving normally writes a temporary file before replacing the old snapshot. Reserve space for the new file and operation, not just the existing snapshot. Keep the only valid snapshot and active temporary files intact. See Redis persistence.
If Docker logs/images or other applications fill the disk, classify and remove only confirmed expendable files unrelated to Redis; see Docker disk usage. Volume-deleting cleanup is not a persistence repair.
A read-only filesystem needs its cause investigated. Preserve data and follow filesystem repair procedures for storage faults; correct the data-mount policy if read-only deployment was intentional. Do not blindly remount every filesystem writable.
For a system service, inspect identity and unit write restrictions:
ps -eo pid,user,group,args | grep '[r]edis-server'
sudo systemctl show redis-server -p User -p Group -p ReadWritePaths -p ProtectSystem
namei -l /var/lib/redis
Use the actual service/path. Saving requires creation, writing and replacement: check dump.rdb, its directory and parent-directory access. Filesystem controls, SELinux/AppArmor and systemd sandboxing can also restrict writes; use logs to identify the cause.
Repair only the confirmed directory/configuration using the real user or UID/GID. Record original ownership and ensure the path is not shared. Avoid broad recursive ownership changes and chmod -R 777.
For Docker bind mounts/volumes, inspect source, target, type and writability:
docker inspect redis --format '{{json .Mounts}}'
docker inspect redis --format 'ReadonlyRootfs={{.HostConfig.ReadonlyRootfs}}'
docker top redis
Find the mount matching Redis's persistence directory. A read-only root filesystem can have a writable data volume; writable unrelated directories do not help a read-only data mount.
Check the actual process identity and host mapping. Do not assume UID 999. The user shown by docker exec ... id may differ from the service process, and rootless/user-namespace mapping affects host ownership.
Preserve the volume while correcting permissions/mounts. If a container must be recreated, first compare in-memory data with the last successful persistence file and assess backups/recovery. Recreating a container does not mean deleting its volume.
RDB saving uses fork and copy-on-write. Writes during saving add memory cost; dataset size, write intensity, fragmentation and other processes affect the peak. Setting maxmemory near total VPS RAM leaves insufficient saving headroom.
Inspect host resources/kernel logs:
free -h
swapon --show
sysctl vm.overcommit_memory
sudo journalctl -k --since "30 minutes ago" --no-pager \
| grep -Ei 'out of memory|oom-kill|killed process'
Also check container usage and limits. Compare INFO memory, copy-on-write metrics and child logs to distinguish allocation-policy refusal from genuine memory exhaustion.
Redis recommends Linux vm.overcommit_memory=1 to reduce overly conservative fork refusal; see administration guidance and the fork FAQ. If evidence identifies that condition, record the original value, check host policy and capacity, then consider a temporary host-side change:
sudo sysctl -w vm.overcommit_memory=1
It changes allocation policy, not RAM capacity. For real OOM, reduce nonessential load, reserve saving headroom or expand resources. Use host/platform administration if containers cannot change it; avoid unrelated container privileges. Persist through existing sysctl management only after verifying effectiveness, and restore the recorded original if reverting.
Confirm instance/resources/path and wait for any required background operation. Record state, then request saving:
LASTSAVE
INFO persistence
BGSAVE
Background saving started means saving started, not finished. BGSAVE can fail while another save or AOF rewrite runs; do not repeatedly trigger it. See BGSAVE behavior.
Check at intervals until completion:
INFO persistence
LASTSAVE
Correlate this operation's time/logs: rdb_bgsave_in_progress returns to 0, latest status is ok, the successful-save time matches this attempt, and a complete snapshot exists in the actual directory. Check AOF independently if enabled; do not mistake an earlier successful save for this one.
After RDB saving recovers, verify writes with an account appropriate to the instance role/ACL and target database. Replace this example key with a unique unused diagnostic name:
SET __diag:rdb-check:20261013-check01 ok EX 60 NX
GET __diag:rdb-check:20261013-check01
TTL __diag:rdb-check:20261013-check01
Expect SET to return OK, readable data and a short TTL. NX prevents replacing an existing key; choose another if occupied. Avoid replicas and business queue/session keys. Finally verify the real application, not just administrator access.
The official FAQ provides a temporary way to permit writes:
CONFIG SET stop-writes-on-bgsave-error no
It stops RDB-save failure from blocking writes; it repairs neither disk, permissions nor snapshots. New data may remain unsaved through RDB and be lost on exit/host failure. It cannot repair AOF write failures.
Consider it only after assessing business tolerance, recording the original setting/recovery plan and arranging persistence monitoring. Redis queues, sessions and important state are not automatically disposable cache.
After fixing the cause and verifying saving, restore the original protection policy; this example uses:
CONFIG SET stop-writes-on-bgsave-error yes
CONFIG GET stop-writes-on-bgsave-error
Runtime settings may not survive restart. Check actual redis.conf, startup arguments and deployment configuration. Keep the temporary bypass from becoming permanent; do not blindly use CONFIG REWRITE to overwrite other runtime changes. Use the established process for read-only or deployment-managed configuration.
Observe normal writes and at least one expected snapshot cycle. Confirm no further save errors and adequate disk, inode, permission and peak-memory conditions. Test queue/session workflows, not only PING.
Back up complete current persistence files/configuration and restore in isolation. See Redis 8 deployment, persistence and backups. A production restart is not a restore drill.