<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Redis Operations Guides on Netdata</title><link>https://www.netdata.cloud/guides/redis/</link><description>Recent content in Redis Operations Guides on Netdata</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://www.netdata.cloud/guides/redis/index.xml" rel="self" type="application/rss+xml"/><item><title>How Redis actually works in production: a mental model for operators</title><link>https://www.netdata.cloud/guides/redis/how-redis-works-in-production/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/how-redis-works-in-production/</guid><description>&lt;h1 id="how-redis-actually-works-in-production-a-mental-model-for-operators">How Redis actually works in production: a mental model for operators&lt;/h1>
&lt;p>Production incidents do not come from the Redis API. They come from invisible internals: a fork that doubles memory usage, a replication backlog that wraps around, a single slow command that freezes every client. You cannot debug a cascading failure at 3 a.m. without knowing which abstractions compete for which resources.&lt;/p>
&lt;h2 id="what-it-is-and-why-it-matters">What it is and why it matters&lt;/h2>
&lt;p>Redis is a single-threaded event loop around an in-memory dataset. Every incident traces back to resource competition inside one process: memory consumed by the dataset, client buffers, replication backlogs, and allocator fragmentation; CPU consumed by command execution, active expiry, and defragmentation; disk I/O consumed by AOF fsync and RDB snapshots; and network bandwidth consumed by replication and Pub/Sub fan-out.&lt;/p></description></item><item><title>MISCONF Redis is configured to save RDB snapshots - what it means and how to fix it</title><link>https://www.netdata.cloud/guides/redis/redis-misconf-rdb-snapshots/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-misconf-rdb-snapshots/</guid><description>&lt;h1 id="misconf-redis-is-configured-to-save-rdb-snapshots---what-it-means-and-how-to-fix-it">MISCONF Redis is configured to save RDB snapshots - what it means and how to fix it&lt;/h1>
&lt;p>Applications see &lt;code>MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk&lt;/code> on every write. Reads still work, but &lt;code>SET&lt;/code>, &lt;code>HSET&lt;/code>, &lt;code>LPUSH&lt;/code>, and all mutating commands are rejected.&lt;/p>
&lt;p>Redis makes itself read-only when the last background save failed and &lt;code>stop-writes-on-bgsave-error&lt;/code> is &lt;code>yes&lt;/code> (the default). The error persists until a subsequent &lt;code>BGSAVE&lt;/code> succeeds. Retrying writes will not help. The instance is protecting you from accepting writes that can never be persisted. To recover, fix the underlying persistence failure and clear the error state with a successful save.&lt;/p></description></item><item><title>Redis and Transparent Huge Pages: why THP must be disabled</title><link>https://www.netdata.cloud/guides/redis/redis-disable-transparent-huge-pages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-disable-transparent-huge-pages/</guid><description>&lt;h1 id="redis-and-transparent-huge-pages-why-thp-must-be-disabled">Redis and Transparent Huge Pages: why THP must be disabled&lt;/h1>
&lt;p>Redis latency spikes during background saves, AOF rewrites, or replica full resyncs often trace to a frozen main thread. Clients time out. Replicas disconnect. If the write rate is high, the next reconnection triggers another fork, and the cascade repeats. One common root cause is Transparent Huge Pages (THP), enabled by default on most Linux distributions. Redis detects THP at startup and logs a warning, but provisioning automation often buries it. The impact is severe: THP can increase fork latency by 10 to 100 times by amplifying copy-on-write memory traffic.&lt;/p></description></item><item><title>Redis aof_last_write_status:err: AOF write failures and recovery</title><link>https://www.netdata.cloud/guides/redis/redis-aof-last-write-status-err/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-aof-last-write-status-err/</guid><description>&lt;h1 id="redis-aof_last_write_statuserr-aof-write-failures-and-recovery">Redis aof_last_write_status:err: AOF write failures and recovery&lt;/h1>
&lt;p>&lt;code>INFO persistence&lt;/code> showing &lt;code>aof_last_write_status:err&lt;/code> means Redis failed to flush its Append-Only File buffer to disk on the last attempt. If you depend on AOF for durability, the instance is no longer persisting writes. With the default &lt;code>appendfsync everysec&lt;/code>, Redis logs the failed fsync and retries, but once &lt;code>aof_last_write_status&lt;/code> is &lt;code>err&lt;/code> and &lt;code>stop-writes-on-bgsave-error&lt;/code> is enabled, the server rejects mutations. The error returned to clients references RDB snapshots even when AOF is the actual failure, which often misleads first-line diagnosis.&lt;/p></description></item><item><title>Redis appendfsync always latency: durability vs throughput trade-offs</title><link>https://www.netdata.cloud/guides/redis/redis-appendfsync-always-latency/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-appendfsync-always-latency/</guid><description>&lt;h1 id="redis-appendfsync-always-latency-durability-vs-throughput-trade-offs">Redis appendfsync always latency: durability vs throughput trade-offs&lt;/h1>
&lt;p>Redis AOF persistence logs every write to disk, but the &lt;code>appendfsync&lt;/code> policy controls how aggressively Redis forces that log to physical storage. That choice defines whether a crash loses zero, one, or sixty seconds of data, and whether a single slow disk seek can freeze the entire event loop.&lt;/p>
&lt;p>&lt;code>appendfsync always&lt;/code> on slow storage degrades throughput more severely than dataset growth. &lt;code>appendfsync no&lt;/code> on a critical ledger silently exposes you to massive data loss.&lt;/p></description></item><item><title>Redis big keys: finding the giant key that blocks the event loop</title><link>https://www.netdata.cloud/guides/redis/redis-big-keys-latency/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-big-keys-latency/</guid><description>&lt;h1 id="redis-big-keys-finding-the-giant-key-that-blocks-the-event-loop">Redis big keys: finding the giant key that blocks the event loop&lt;/h1>
&lt;p>Application latency spikes while &lt;code>redis-cli PING&lt;/code> still returns &lt;code>PONG&lt;/code>. Simple &lt;code>GET&lt;/code> commands take hundreds of milliseconds. Aggregate &lt;code>used_memory&lt;/code> looks stable, &lt;code>instantaneous_ops_per_sec&lt;/code> drops, and the slowlog grows. The culprit is often a single oversized key: a sorted set with millions of elements, a hash with millions of fields, or a list fetched with an unbounded range. Redis executes commands sequentially on one main thread; an O(N) command on a giant key blocks every other client until it completes. This guide shows how to find that key and fix it without restarting Redis.&lt;/p></description></item><item><title>Redis blocked_clients growing: dead consumers vs healthy queues</title><link>https://www.netdata.cloud/guides/redis/redis-blocked-clients-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-blocked-clients-growing/</guid><description>&lt;h1 id="redis-blocked_clients-growing-dead-consumers-vs-healthy-queues">Redis blocked_clients growing: dead consumers vs healthy queues&lt;/h1>
&lt;p>&lt;code>blocked_clients&lt;/code> in &lt;code>INFO clients&lt;/code> is climbing. In queue-based architectures this is often normal: workers call &lt;code>BLPOP&lt;/code>, &lt;code>BRPOP&lt;/code>, or &lt;code>XREAD BLOCK&lt;/code> and wait for producers to push work. When &lt;code>blocked_clients&lt;/code> grows while queue depth also grows, consumers are no longer consuming. They may have crashed, been OOM-killed, or stalled on replication lag via &lt;code>WAIT&lt;/code>.&lt;/p>
&lt;p>&lt;code>blocked_clients&lt;/code> counts only clients waiting on explicit blocking commands. It does not capture clients stalled by slow commands like &lt;code>KEYS *&lt;/code> or large &lt;code>SMEMBERS&lt;/code>. A high value is either a healthy signal of an active queue pattern or a pathological signal of dead connections holding slots open forever, especially with timeout &lt;code>0&lt;/code>.&lt;/p></description></item><item><title>Redis BUSY Redis is busy running a script: blocking Lua and how to recover</title><link>https://www.netdata.cloud/guides/redis/redis-busy-running-script/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-busy-running-script/</guid><description>&lt;h1 id="redis-busy-redis-is-busy-running-a-script-blocking-lua-and-how-to-recover">Redis BUSY Redis is busy running a script: blocking Lua and how to recover&lt;/h1>
&lt;p>&lt;code>redis-cli&lt;/code> returns &lt;code>(error) BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.&lt;/code> Normal commands stall. Redis is not down, but it might as well be: a Lua script is holding the single event loop hostage and will not yield until it finishes or you intervene.&lt;/p>
&lt;p>Redis executes &lt;code>EVAL&lt;/code> and &lt;code>EVALSHA&lt;/code> atomically. While a script runs, no other command processes. Once execution exceeds &lt;code>lua-time-limit&lt;/code> (default 5000 ms), Redis replies with &lt;code>BUSY&lt;/code> to other clients. The script itself continues until it finishes, is killed, or the server shuts down. Whether the script has already performed writes determines whether you can kill it safely or must choose between waiting and a hard shutdown.&lt;/p></description></item><item><title>Redis Can't save in background: fork: Cannot allocate memory - diagnosis and fix</title><link>https://www.netdata.cloud/guides/redis/redis-cant-save-in-background-fork/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-cant-save-in-background-fork/</guid><description>&lt;h1 id="redis-cant-save-in-background-fork-cannot-allocate-memory---diagnosis-and-fix">Redis Can&amp;rsquo;t save in background: fork: Cannot allocate memory - diagnosis and fix&lt;/h1>
&lt;p>Redis logs &lt;code>Can't save in background: fork: Cannot allocate memory&lt;/code>. &lt;code>free -h&lt;/code> shows plenty of free RAM, yet &lt;code>BGSAVE&lt;/code> or &lt;code>BGREWRITEAOF&lt;/code> fails. If &lt;code>stop-writes-on-bgsave-error&lt;/code> is &lt;code>yes&lt;/code> (default), writes fail too. The gap between free RAM and fork failure is the key.&lt;/p>
&lt;p>This is not a simple OOM. It is a kernel commit charge failure. Linux &lt;code>fork()&lt;/code> must account for the worst case where every copy-on-write page is modified. With &lt;code>vm.overcommit_memory=0&lt;/code> (the default), the kernel enforces a heuristic commit limit. When Redis RSS is large, that limit blocks &lt;code>fork()&lt;/code> even with free physical memory. The fix is usually one sysctl, but THP, container limits, and actual RAM headroom determine whether it holds.&lt;/p></description></item><item><title>Redis client output buffer overflow: slow consumers and client-output-buffer-limit</title><link>https://www.netdata.cloud/guides/redis/redis-client-output-buffer-limit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-client-output-buffer-limit/</guid><description>&lt;h1 id="redis-client-output-buffer-overflow-slow-consumers-and-client-output-buffer-limit">Redis client output buffer overflow: slow consumers and client-output-buffer-limit&lt;/h1>
&lt;p>Redis memory climbs faster than the dataset justifies. &lt;code>used_memory&lt;/code> approaches &lt;code>maxmemory&lt;/code>, keys evict, or the process is OOM-killed, yet the keyspace has not grown. Logs show &amp;ldquo;scheduled to be closed ASAP for overcoming of output buffer limits,&amp;rdquo; or clients vanish and reconnect. The culprit is usually a slow consumer that cannot drain its output buffer as fast as Redis fills it. A forgotten &lt;code>MONITOR&lt;/code> session or an application that left a socket open but stopped reading are the textbook cases. Redis allocates client output buffers from the main heap; unread response data counts against &lt;code>maxmemory&lt;/code>. The default &lt;code>client-output-buffer-limit normal 0 0 0&lt;/code> leaves normal clients unbounded, turning one slow reader into a memory leak that can kill the instance.&lt;/p></description></item><item><title>Redis cluster bus port blocked: the port+10000 firewall gotcha</title><link>https://www.netdata.cloud/guides/redis/redis-cluster-gossip-port-blocked/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-cluster-gossip-port-blocked/</guid><description>&lt;h1 id="redis-cluster-bus-port-blocked-the-port10000-firewall-gotcha">Redis cluster bus port blocked: the port+10000 firewall gotcha&lt;/h1>
&lt;p>&lt;code>CLUSTER INFO&lt;/code> reports &lt;code>cluster_state:fail&lt;/code>. Nodes show non-zero &lt;code>cluster_slots_pfail&lt;/code>. Clients receive &lt;code>CLUSTERDOWN&lt;/code>. Yet &lt;code>redis-cli -p 6379 PING&lt;/code> returns &lt;code>PONG&lt;/code> on every node, application connections are still accepted, and the client port shows no obvious network outage. The cluster behaves like it is partitioned, but only the bus is broken. Port 16379, or your configured client port plus 10000, is missing from a firewall rule, security group, or container port mapping. The cluster bus carries gossip, failure detection, and node discovery over this separate TCP port. When the bus is unreachable, nodes cannot synchronize the cluster map, so they mark peers as failed and withdraw slot coverage even though the data port stays healthy. Because firewall rules often cover the client port but omit the bus port, this failure mode is common after infrastructure changes, node replacements, or environment migrations.&lt;/p></description></item><item><title>Redis cluster_slots_pfail > 0: impending node failure in a cluster</title><link>https://www.netdata.cloud/guides/redis/redis-cluster-slots-pfail/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-cluster-slots-pfail/</guid><description>&lt;h1 id="redis-cluster_slots_pfail--0-impending-node-failure-in-a-cluster">Redis cluster_slots_pfail &amp;gt; 0: impending node failure in a cluster&lt;/h1>
&lt;p>&lt;code>cluster_slots_pfail &amp;gt; 0&lt;/code> means at least one hash slot is mapped to a node that a peer suspects is down. In Redis Cluster, PFAIL is unilateral: any node raises it when another stops answering gossip PINGs for longer than &lt;code>cluster-node-timeout&lt;/code>. Slots continue to serve traffic; the cluster has not yet agreed the node is dead.&lt;/p>
&lt;p>Brief spikes are expected during background saves, AOF rewrites, or any main-thread freeze. Sustained non-zero values indicate a real problem: network partition, node crash, or overload. If the majority of masters confirm the suspicion within twice &lt;code>cluster-node-timeout&lt;/code>, PFAIL escalates to FAIL. The affected slots become unavailable until a replica wins election. In a three-master cluster, losing two primaries leaves the survivor without quorum. The cluster enters a zombie state where no failover can proceed. Investigate PFAIL while you still have quorum and before automatic escalation.&lt;/p></description></item><item><title>Redis CLUSTERDOWN / cluster_state:fail: slot coverage and recovery</title><link>https://www.netdata.cloud/guides/redis/redis-cluster-state-fail/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-cluster-state-fail/</guid><description>&lt;h1 id="redis-clusterdown--cluster_statefail-slot-coverage-and-recovery">Redis CLUSTERDOWN / cluster_state:fail: slot coverage and recovery&lt;/h1>
&lt;p>&lt;code>CLUSTERDOWN The cluster is down&lt;/code> means at least one of the 16384 hash slots lacks a healthy master. With &lt;code>cluster-require-full-coverage yes&lt;/code> (the default), a single missing slot blocks all writes. This guide covers diagnosing the root cause, recovering safely, and preventing recurrence.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>Redis Cluster shards the keyspace across 16384 hash slots. Each slot must be assigned to a master node that is reachable and healthy to count toward &lt;code>cluster_slots_ok&lt;/code>. When &lt;code>cluster_slots_assigned&lt;/code> drops below 16384, or &lt;code>cluster_slots_fail&lt;/code> becomes non-zero because a node has been marked FAIL by quorum, the cluster transitions to &lt;code>cluster_state:fail&lt;/code>. Clients receive &lt;code>CLUSTERDOWN&lt;/code> for operations hashing to affected slots.&lt;/p></description></item><item><title>Redis connected_clients climbing: connection leak detection</title><link>https://www.netdata.cloud/guides/redis/redis-connected-clients-climbing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-connected-clients-climbing/</guid><description>&lt;h1 id="redis-connected_clients-climbing-connection-leak-detection">Redis connected_clients climbing: connection leak detection&lt;/h1>
&lt;p>A sustained climb in &lt;code>connected_clients&lt;/code> over hours or days while application traffic is flat is a classic Redis connection leak. Each connection costs roughly 10 KB of server-side memory. A thousand leaked connections consume ~100 MB independent of your dataset. If the instance is near &lt;code>maxmemory&lt;/code>, that overhead can push Redis into eviction or OOM territory.&lt;/p>
&lt;p>The default &lt;code>timeout&lt;/code> is 0, so idle connections are never closed. Missing &lt;code>close()&lt;/code> calls, connection pool misconfiguration, or unsubscribed pub/sub listeners all accumulate forever.&lt;/p></description></item><item><title>Redis connected_slaves dropped: detecting replica disconnects on the primary</title><link>https://www.netdata.cloud/guides/redis/redis-connected-slaves-dropped/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-connected-slaves-dropped/</guid><description>&lt;h1 id="redis-connected_slaves-dropped-detecting-replica-disconnects-on-the-primary">Redis connected_slaves dropped: detecting replica disconnects on the primary&lt;/h1>
&lt;p>If &lt;code>INFO replication&lt;/code> on a Redis primary shows &lt;code>connected_slaves&lt;/code> lower than expected, the missing replica shrinks read capacity, makes a full resync likely, and widens the data-loss window during failover. The primary does not keep a tombstone: it decrements the counter and drops the corresponding &lt;code>slaveN&lt;/code> line from the next &lt;code>INFO&lt;/code> sample. You need to determine whether the replica crashed, the network partitioned, or Sentinel promoted the replica and the old primary has not caught up.&lt;/p></description></item><item><title>Redis connection exhaustion: leaks, pools, and the retry storm</title><link>https://www.netdata.cloud/guides/redis/redis-connection-exhaustion/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-connection-exhaustion/</guid><description>&lt;h1 id="redis-connection-exhaustion-leaks-pools-and-the-retry-storm">Redis connection exhaustion: leaks, pools, and the retry storm&lt;/h1>
&lt;p>Application logs show connection timeouts and Redis returns &lt;code>ERR max number of clients reached&lt;/code>. Downstream services fail because they cannot reach the cache. &lt;code>INFO clients&lt;/code> shows &lt;code>connected_clients&lt;/code> at the hard limit even though traffic has not increased. This is connection exhaustion. The most dangerous response is a retry storm that turns a small leak into a site-wide cascade.&lt;/p>
&lt;p>Redis enforces a hard upper bound on connections via &lt;code>maxclients&lt;/code>. When the sum of &lt;code>connected_clients&lt;/code>, &lt;code>connected_slaves&lt;/code>, and &lt;code>cluster_connections&lt;/code> reaches that limit, Redis rejects every new TCP connection. Applications that retry immediately without backoff create a feedback loop: existing connections age out slowly while new attempts pile up, keeping the server pinned at the limit even after the original leak stops growing.&lt;/p></description></item><item><title>Redis CPU saturation: hitting the single-core throughput ceiling</title><link>https://www.netdata.cloud/guides/redis/redis-cpu-saturation-single-thread/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-cpu-saturation-single-thread/</guid><description>&lt;h1 id="redis-cpu-saturation-hitting-the-single-core-throughput-ceiling">Redis CPU saturation: hitting the single-core throughput ceiling&lt;/h1>
&lt;p>Redis latency climbs. PING returns PONG, but simple GETs take milliseconds instead of microseconds. Host CPU looks moderate - perhaps 25% across eight cores - yet commands queue. The likely cause is main-thread CPU saturation. Redis executes all commands on a single event-loop thread. Once that thread saturates one core, latency rises linearly with queue depth. There is no performance cliff - only a steady ramp that eventually drives client timeouts. On multi-core hosts, aggregate process CPU hides this bottleneck because background children, I/O threads, and system accounting spread usage across cores.&lt;/p></description></item><item><title>Redis event loop blocked: when one slow command freezes everything</title><link>https://www.netdata.cloud/guides/redis/redis-event-loop-blocked/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-event-loop-blocked/</guid><description>&lt;h1 id="redis-event-loop-blocked-when-one-slow-command-freezes-everything">Redis event loop blocked: when one slow command freezes everything&lt;/h1>
&lt;p>Redis processes every command on a single main thread. Even with Redis 6.0 and later offloading network I/O to threads, command execution itself remains strictly sequential. When one command takes too long, everything behind it waits. You will see clients still connected, but &lt;code>PING&lt;/code> stalls and throughput collapses to zero. This is the Slow Command Snowball pattern: a single expensive operation blocks the event loop, the client queue backs up, and latency compounds across every connected application.&lt;/p></description></item><item><title>Redis eviction policy tuning: allkeys-lru vs volatile-ttl vs noeviction</title><link>https://www.netdata.cloud/guides/redis/redis-eviction-policy-tuning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-eviction-policy-tuning/</guid><description>&lt;h1 id="redis-eviction-policy-tuning-allkeys-lru-vs-volatile-ttl-vs-noeviction">Redis eviction policy tuning: allkeys-lru vs volatile-ttl vs noeviction&lt;/h1>
&lt;p>When Redis reaches &lt;code>maxmemory&lt;/code>, it must either reject new writes or delete existing keys. The &lt;code>maxmemory-policy&lt;/code> directive decides which path it takes, yet many production instances run with a policy that mismatches the workload. A cache running &lt;code>noeviction&lt;/code> returns OOM errors to clients. A database running &lt;code>allkeys-lru&lt;/code> silently deletes committed data. A session store running &lt;code>volatile-ttl&lt;/code> suddenly rejects writes the moment an application bug omits a TTL.&lt;/p></description></item><item><title>Redis exposed without authentication: the CONFIG SET dir crontab attack</title><link>https://www.netdata.cloud/guides/redis/redis-exposed-without-auth/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-exposed-without-auth/</guid><description>&lt;h1 id="redis-exposed-without-authentication-the-config-set-dir-crontab-attack">Redis exposed without authentication: the CONFIG SET dir crontab attack&lt;/h1>
&lt;p>An unauthenticated Redis instance on a public interface is remote code execution. The classic attack chains four commands: &lt;code>CONFIG SET dir&lt;/code> to a cron folder, &lt;code>CONFIG SET dbfilename&lt;/code> to a valid cron file, &lt;code>SET&lt;/code> a malicious payload, and &lt;code>SAVE&lt;/code>. If Redis runs as root, the host is compromised immediately. If unprivileged, attackers pivot via SSH keys or systemd timers.&lt;/p>
&lt;p>This guide is an operational audit and lockdown. It covers how the file-write attack works, how to detect exposure, how to check for active compromise, and how to harden the instance. It also covers the follow-on risk: once authenticated access is gained, recently disclosed authenticated RCE bugs can escalate to full system control.&lt;/p></description></item><item><title>Redis FLUSHALL ran in production: detection, prevention, and recovery</title><link>https://www.netdata.cloud/guides/redis/redis-flushall-data-loss/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-flushall-data-loss/</guid><description>&lt;h1 id="redis-flushall-ran-in-production-detection-prevention-and-recovery">Redis FLUSHALL ran in production: detection, prevention, and recovery&lt;/h1>
&lt;p>FLUSHALL deletes every key in every logical database. Under default &lt;code>save&lt;/code> policies, the server typically triggers a background save of the empty keyspace within seconds, overwriting the RDB snapshot. There is no undo. If you are responding to an active incident, your priorities are: confirm the scope, isolate unaffected replicas before they process the flush, recover from the freshest intact persistence source, and harden the instance.&lt;/p></description></item><item><title>Redis fork/COW memory storm: why persistence doubles RSS and OOM-kills the box</title><link>https://www.netdata.cloud/guides/redis/redis-fork-cow-storm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-fork-cow-storm/</guid><description>&lt;h1 id="redis-forkcow-memory-storm-why-persistence-doubles-rss-and-oom-kills-the-box">Redis fork/COW memory storm: why persistence doubles RSS and OOM-kills the box&lt;/h1>
&lt;p>Redis disappeared from your container with only an &lt;code>OOMKilled&lt;/code> status and a metrics gap that aligns with an RDB snapshot or AOF rewrite. The dataset was under its memory limit moments ago, but during persistence the reported RSS doubled and the kernel killed the process.&lt;/p>
&lt;p>This is the Redis fork/copy-on-write memory storm. Redis calls &lt;code>fork()&lt;/code> to spawn a child process for background RDB snapshots, AOF rewrites, and full replication syncs. After the fork, parent and child share pages through copy-on-write. Pages stay read-only until one process writes. If the parent continues serving writes, every modified page is copied. On a write-heavy instance, this can duplicate the entire dataset, pushing RSS to roughly twice the logical data size. Containers with tight memory limits do not see &lt;code>used_memory&lt;/code>; they see RSS. When RSS hits the cgroup ceiling, the OOM killer fires, both processes die, and the instance restarts cold.&lt;/p></description></item><item><title>Redis KEYS command blocking production: why to replace it with SCAN</title><link>https://www.netdata.cloud/guides/redis/redis-keys-command-blocking-production/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-keys-command-blocking-production/</guid><description>&lt;h1 id="redis-keys-command-blocking-production-why-to-replace-it-with-scan">Redis KEYS command blocking production: why to replace it with SCAN&lt;/h1>
&lt;p>Redis P99 latency jumps from sub-millisecond to seconds. Clients time out. &lt;code>instantaneous_ops_per_sec&lt;/code> drops to near zero while &lt;code>connected_clients&lt;/code> stays high. The likely culprit is a single slow command monopolizing the event loop, and &lt;code>KEYS&lt;/code> is the classic offender.&lt;/p>
&lt;p>Redis runs all client commands on one main thread. &lt;code>KEYS&lt;/code> scans the entire keyspace synchronously to match a pattern. Time complexity is O(N) where N is the total number of keys. During the scan, nothing else executes. Every client, including replication streams, health checks, and monitoring probes, waits.&lt;/p></description></item><item><title>Redis keyspace growing unbounded: keys without TTL and memory leaks</title><link>https://www.netdata.cloud/guides/redis/redis-keyspace-growing-unbounded/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-keyspace-growing-unbounded/</guid><description>&lt;h1 id="redis-keyspace-growing-unbounded-keys-without-ttl-and-memory-leaks">Redis keyspace growing unbounded: keys without TTL and memory leaks&lt;/h1>
&lt;p>Redis memory climbs. &lt;code>used_memory&lt;/code> approaches &lt;code>maxmemory&lt;/code>, or the OOM killer intervenes. In &lt;code>INFO keyspace&lt;/code>, &lt;code>keys&lt;/code> rises while &lt;code>expires&lt;/code> stays flat. Or both rise, but &lt;code>used_memory_rss&lt;/code> outpaces the dataset. Unbounded keyspace growth is a symptom, not a root cause: missing TTLs, application bugs, expiration backlog, or leaks in client buffers and allocators.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>&lt;code>INFO keyspace&lt;/code> reports &lt;code>db{N}:keys=X,expires=Y,avg_ttl=Z&lt;/code>. The &lt;code>keys&lt;/code> field counts every key; &lt;code>expires&lt;/code> counts only those with a TTL. When &lt;code>keys&lt;/code> grows and &lt;code>expires&lt;/code> does not, new keys are being created without expiration. Even when &lt;code>expires&lt;/code> tracks &lt;code>keys&lt;/code>, memory can still grow if the active expiration cycle cannot delete keys as fast as they are created.&lt;/p></description></item><item><title>Redis latency spikes: diagnosis with the LATENCY subsystem</title><link>https://www.netdata.cloud/guides/redis/redis-latency-spikes-diagnosis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-latency-spikes-diagnosis/</guid><description>&lt;h1 id="redis-latency-spikes-diagnosis-with-the-latency-subsystem">Redis latency spikes: diagnosis with the LATENCY subsystem&lt;/h1>
&lt;p>Your application P99 latency just jumped and clients are timing out. The infrastructure dashboard shows the Redis host is up, memory is not exhausted, and ops per second look normal, yet something is blocking the main thread. It could be a single &lt;code>KEYS *&lt;/code> freezing the event loop, a &lt;code>fork()&lt;/code> duplicating page tables for an RDB save, an AOF &lt;code>fsync&lt;/code> stalling on saturated disk, or the active expire cycle burning CPU. Standard &lt;code>INFO&lt;/code> counters will not tell you which one.&lt;/p></description></item><item><title>Redis latest_fork_usec too high: THP, NUMA, and fork latency</title><link>https://www.netdata.cloud/guides/redis/redis-latest-fork-usec-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-latest-fork-usec-high/</guid><description>&lt;h1 id="redis-latest_fork_usec-too-high-thp-numa-and-fork-latency">Redis latest_fork_usec too high: THP, NUMA, and fork latency&lt;/h1>
&lt;p>&lt;code>INFO stats&lt;/code> shows &lt;code>latest_fork_usec&lt;/code> in the hundreds of milliseconds. Every &lt;code>fork()&lt;/code> blocks the single event loop, so during that window no commands are processed. Clients time out, replicas disconnect, and a full resync can trigger another fork, creating a loop of latency and reconnection storms. A normal fork costs roughly 10-20ms per gigabyte of resident memory with Transparent Huge Pages disabled. If you are seeing 10-100x that, the culprit is usually THP, NUMA, or memory overcommit policy.&lt;/p></description></item><item><title>Redis Linux kernel tuning: vm.overcommit_memory, swappiness, and NUMA</title><link>https://www.netdata.cloud/guides/redis/redis-kernel-tuning-overcommit-swappiness/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-kernel-tuning-overcommit-swappiness/</guid><description>&lt;h1 id="redis-linux-kernel-tuning-vmovercommit_memory-swappiness-and-numa">Redis Linux kernel tuning: vm.overcommit_memory, swappiness, and NUMA&lt;/h1>
&lt;p>Redis uses fork-based copy-on-write for background saves, AOF rewrites, and full replication resyncs. Linux defaults for memory overcommit, swap, page size, and socket queuing suit general-purpose workloads, not an in-memory store that clones multi-gigabyte address spaces. Left unchanged, they produce intermittent &lt;code>Cannot allocate memory&lt;/code> errors during BGSAVE, 10-100x latency spikes during AOF rewrite, and silent OOM kills. This guide covers the five host-level tunables, the failure mode each prevents, and the production signals that expose a misconfigured host.&lt;/p></description></item><item><title>Redis LOADING Redis is loading the dataset in memory - why and how long</title><link>https://www.netdata.cloud/guides/redis/redis-loading-dataset-in-memory/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-loading-dataset-in-memory/</guid><description>&lt;h1 id="redis-loading-redis-is-loading-the-dataset-in-memory---why-and-how-long">Redis LOADING Redis is loading the dataset in memory - why and how long&lt;/h1>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>When &lt;code>INFO persistence&lt;/code> returns &lt;code>loading:1&lt;/code>, Redis is reading an RDB dump or replaying an AOF log into memory. This happens after any restart where persistence files are present. &lt;code>redis-cli PING&lt;/code> returns &lt;code>PONG&lt;/code>, but all data commands such as &lt;code>GET&lt;/code>, &lt;code>SET&lt;/code>, and &lt;code>HGETALL&lt;/code> are rejected with a &lt;code>-LOADING&lt;/code> error. The &lt;code>loading_loaded_perc&lt;/code>, &lt;code>loading_loaded_bytes&lt;/code>, and &lt;code>loading_eta_seconds&lt;/code> fields expose real-time progress. While loading is active, latency, hit rate, and eviction metrics are meaningless. Load duration ranges from seconds for small RDB snapshots to tens of minutes, or even hours, for large AOF files on slow disks.&lt;/p></description></item><item><title>Redis low keyspace hit rate: cache effectiveness and cold-start recovery</title><link>https://www.netdata.cloud/guides/redis/redis-low-keyspace-hit-rate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-low-keyspace-hit-rate/</guid><description>&lt;h1 id="redis-low-keyspace-hit-rate-cache-effectiveness-and-cold-start-recovery">Redis low keyspace hit rate: cache effectiveness and cold-start recovery&lt;/h1>
&lt;p>A low keyspace hit rate turns Redis into a pass-through to the backend. The metric is &lt;code>keyspace_hits / (keyspace_hits + keyspace_misses)&lt;/code>, but interpreting it is not simple. A restarted instance shows 0% for minutes. Workloads heavy on &lt;code>EXISTS&lt;/code> naturally miss. A cache that evicts faster than it is hit degrades silently until backend load spikes. This guide shows how to distinguish real cache degradation from false alarms and recover.&lt;/p></description></item><item><title>Redis mass key expiration spike: TTL jitter and the active expiry cycle</title><link>https://www.netdata.cloud/guides/redis/redis-mass-key-expiration-spike/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-mass-key-expiration-spike/</guid><description>&lt;h1 id="redis-mass-key-expiration-spike-ttl-jitter-and-the-active-expiry-cycle">Redis mass key expiration spike: TTL jitter and the active expiry cycle&lt;/h1>
&lt;p>Your application latency graph just spiked. Redis &lt;code>instantaneous_ops_per_sec&lt;/code> dropped. &lt;code>keyspace_misses&lt;/code> jumped. &lt;code>INFO stats&lt;/code> shows &lt;code>expired_keys&lt;/code> climbing by thousands per second. The cause is likely not a traffic surge, but a wave of keys hitting TTL at the same moment. When millions of keys share an identical expiration time, Redis&amp;rsquo;s active expiry cycle cannot sample and delete them fast enough. The main thread spends increasing time on expiration cleanup, blocking client commands and triggering a cache stampede as expired keys return nil.&lt;/p></description></item><item><title>Redis MASTERDOWN / master_link_status:down: replication link broken</title><link>https://www.netdata.cloud/guides/redis/redis-master-link-status-down/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-master-link-status-down/</guid><description>&lt;h1 id="redis-masterdown--master_link_statusdown-replication-link-broken">Redis MASTERDOWN / master_link_status:down: replication link broken&lt;/h1>
&lt;p>You see &lt;code>MASTERDOWN&lt;/code> errors from client libraries, or monitoring shows &lt;code>master_link_status:down&lt;/code> on a replica. The replica is still accepting connections and serving reads, but every response is increasingly stale. The primary continues to take writes, so the gap widens. Determine whether this is a transient resync or a real partition, and fix it without forcing an expensive full resync that freezes the primary with a fork.&lt;/p></description></item><item><title>Redis max number of clients reached: maxclients and rejected_connections</title><link>https://www.netdata.cloud/guides/redis/redis-max-number-of-clients-reached/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-max-number-of-clients-reached/</guid><description>&lt;h1 id="redis-max-number-of-clients-reached-maxclients-and-rejected_connections">Redis max number of clients reached: maxclients and rejected_connections&lt;/h1>
&lt;p>&lt;code>ERR max number of clients reached&lt;/code> in application logs, or a rising &lt;code>rejected_connections&lt;/code> metric, means new TCP sockets are refused while existing connections work normally. &lt;code>PING&lt;/code> still returns &lt;code>PONG&lt;/code>. The failure is a hard cliff: once the total connection count hits &lt;code>maxclients&lt;/code>, every new connection is rejected immediately. Because &lt;code>rejected_connections&lt;/code> is cumulative, a flat line is healthy and any upward slope is an active incident.&lt;/p></description></item><item><title>Redis maxmemory not set: why every production instance needs a memory limit</title><link>https://www.netdata.cloud/guides/redis/redis-maxmemory-not-set/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-maxmemory-not-set/</guid><description>&lt;h1 id="redis-maxmemory-not-set-why-every-production-instance-needs-a-memory-limit">Redis maxmemory not set: why every production instance needs a memory limit&lt;/h1>
&lt;p>On 64-bit builds, Redis defaults maxmemory to 0. In production, this is an incident waiting to happen. A value of 0 means Redis tracks used_memory but enforces no limit. The process grows until the host OS OOM killer intervenes, or until a container memory limit triggers a SIGKILL. Redis dies without warning, restarts into a cold cache, and faces a thundering herd of client reconnections that immediately reapply the same write pressure. The cycle repeats until the configuration is fixed.&lt;/p></description></item><item><title>Redis mem_fragmentation_ratio below 1.0: detecting swap death</title><link>https://www.netdata.cloud/guides/redis/redis-swapping-fragmentation-below-one/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-swapping-fragmentation-below-one/</guid><description>&lt;h1 id="redis-mem_fragmentation_ratio-below-10-detecting-swap-death">Redis mem_fragmentation_ratio below 1.0: detecting swap death&lt;/h1>
&lt;p>A &lt;code>mem_fragmentation_ratio&lt;/code> of 0.72 on a substantial dataset means the operating system has swapped out Redis memory pages. Redis stays alive and responds to &lt;code>PING&lt;/code>, but every command touching a swapped key blocks the single event loop on disk I/O. Because Redis logs nothing about swap, the resulting latency catastrophe looks like a mystery.&lt;/p>
&lt;p>&lt;code>mem_fragmentation_ratio&lt;/code> equals &lt;code>used_memory_rss / used_memory&lt;/code>. When the ratio drops below 1.0, the resident set size is smaller than the memory Redis requested from its allocator. The missing bytes are in swap. Operators typically watch for ratios above 1.5, so a low ratio is misread as &amp;ldquo;good fragmentation&amp;rdquo; when it is actually the worst memory-related failure mode short of an OOM kill.&lt;/p></description></item><item><title>Redis mem_fragmentation_ratio high: jemalloc fragmentation and active defrag</title><link>https://www.netdata.cloud/guides/redis/redis-mem-fragmentation-ratio-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-mem-fragmentation-ratio-high/</guid><description>&lt;h1 id="redis-mem_fragmentation_ratio-high-jemalloc-fragmentation-and-active-defrag">Redis mem_fragmentation_ratio high: jemalloc fragmentation and active defrag&lt;/h1>
&lt;p>A &lt;code>mem_fragmentation_ratio&lt;/code> sustained above 1.5 on a production instance means Redis holds significantly more physical memory (RSS) than its logical dataset size (&lt;code>used_memory&lt;/code>), wasting RAM that could hold data or absorb spikes. This is not a memory leak. Redis uses jemalloc by default, which does not return freed pages to the OS eagerly. Deleted or resized keys leave holes in allocator arenas, inflating RSS while &lt;code>used_memory&lt;/code> stays flat or drops.&lt;/p></description></item><item><title>Redis memory pressure spiral: eviction thrashing and how to break it</title><link>https://www.netdata.cloud/guides/redis/redis-memory-pressure-spiral/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-memory-pressure-spiral/</guid><description>&lt;h1 id="redis-memory-pressure-spiral-eviction-thrashing-and-how-to-break-it">Redis memory pressure spiral: eviction thrashing and how to break it&lt;/h1>
&lt;p>Redis latency climbs, CPU saturates, and cache hit rate falls. &lt;code>evicted_keys&lt;/code> rises while application writes increase. The backend database gets hammered. This is not a simple capacity shortage; it is a memory pressure spiral. Redis has reached &lt;code>maxmemory&lt;/code> and started evicting keys. The application responds to cache misses by re-fetching from the origin and writing back to Redis. Those writes trigger more evictions, which cause more misses, which cause more writes. Redis does maximum work for minimum value.&lt;/p></description></item><item><title>Redis MONITOR left running: the output-buffer OOM footgun</title><link>https://www.netdata.cloud/guides/redis/redis-monitor-command-oom/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-monitor-command-oom/</guid><description>&lt;h1 id="redis-monitor-left-running-the-output-buffer-oom-footgun">Redis MONITOR left running: the output-buffer OOM footgun&lt;/h1>
&lt;p>A forgotten &lt;code>MONITOR&lt;/code> session typically produces this pattern:&lt;/p>
&lt;ul>
&lt;li>&lt;code>used_memory&lt;/code> and &lt;code>used_memory_rss&lt;/code> climb steadily.&lt;/li>
&lt;li>If &lt;code>maxmemory&lt;/code> is set and an eviction policy is active, keys disappear; otherwise the kernel OOM killer may terminate the process.&lt;/li>
&lt;li>Application latency spikes.&lt;/li>
&lt;li>Network output roughly doubles network input.&lt;/li>
&lt;li>No large keys, no persistence fork, and no replication backlog overflow.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>MONITOR&lt;/code> streams a serialized copy of every executed command into the requesting client&amp;rsquo;s output buffer. That buffer is allocated on the main heap and counts in &lt;code>used_memory&lt;/code>, which contributes to &lt;code>maxmemory&lt;/code> pressure and RSS growth &lt;!-- TODO: verify that normal client output buffers are included in the maxmemory eviction accounting; replica output buffers are explicitly excluded -->. Redis classifies &lt;code>MONITOR&lt;/code> clients as normal clients, and the default &lt;code>client-output-buffer-limit normal 0 0 0&lt;/code> places no bound on normal client output buffers. Under production load, the buffer can grow by multiple gigabytes per minute. The monitor client also consumes roughly one extra copy of outbound network traffic, so output bandwidth approximately doubles.&lt;/p></description></item><item><title>Redis monitoring checklist: the signals every production instance needs</title><link>https://www.netdata.cloud/guides/redis/redis-monitoring-checklist/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-monitoring-checklist/</guid><description>&lt;h1 id="redis-monitoring-checklist-the-signals-every-production-instance-needs">Redis monitoring checklist: the signals every production instance needs&lt;/h1>
&lt;p>Redis can return PONG while replicating hours behind, during an OOM kill in a background save, or while a KEYS command wedges the event loop. This checklist structures monitoring into four maturity levels. Level 1 is the survival floor. Level 2 adds workload and resource awareness. Level 3 introduces leading indicators that catch degradation before it becomes an incident. Level 4 exposes allocator and encoding internals for granular diagnostics.&lt;/p></description></item><item><title>Redis monitoring maturity model: from survival to expert</title><link>https://www.netdata.cloud/guides/redis/redis-monitoring-maturity-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-monitoring-maturity-model/</guid><description>&lt;h1 id="redis-monitoring-maturity-model-from-survival-to-expert">Redis monitoring maturity model: from survival to expert&lt;/h1>
&lt;p>Redis can return PONG while fragmentation doubles RSS, a replica falls behind, or a slow command wedges the event loop. This guide maps four cumulative operator levels derived from production runbooks. Level 1 is liveness and memory limits. Level 2 is workload anomalies and capacity pressure. Level 3 is leading indicators for composite failures. Level 4 is forensic depth. Do not skip Level 1 because you are collecting allocator statistics.&lt;/p></description></item><item><title>Redis NOAUTH / WRONGPASS authentication failures: ACL LOG and credential drift</title><link>https://www.netdata.cloud/guides/redis/redis-acl-noauth-errors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-acl-noauth-errors/</guid><description>&lt;h1 id="redis-noauth--wrongpass-authentication-failures-acl-log-and-credential-drift">Redis NOAUTH / WRONGPASS authentication failures: ACL LOG and credential drift&lt;/h1>
&lt;p>Application logs report &lt;code>(error) NOAUTH Authentication required&lt;/code> or &lt;code>(error) WRONGPASS invalid username-password pair or user is disabled&lt;/code>. Connections drop, transactions abort, and previously working requests are rejected. Redis does not expose an authentication failure counter in &lt;code>INFO stats&lt;/code>; on Redis 6.0 and later, &lt;code>ACL LOG&lt;/code> is the only structured source. On earlier versions, scrape the log file. Correlate the failure source, username, and timing to distinguish credential drift, misconfiguration, and brute-force probes.&lt;/p></description></item><item><title>Redis OOM command not allowed when used memory > 'maxmemory' - causes and fixes</title><link>https://www.netdata.cloud/guides/redis/redis-oom-command-not-allowed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-oom-command-not-allowed/</guid><description>&lt;h1 id="redis-oom-command-not-allowed-when-used-memory--maxmemory---causes-and-fixes">Redis OOM command not allowed when used memory &amp;gt; &amp;lsquo;maxmemory&amp;rsquo; - causes and fixes&lt;/h1>
&lt;p>Redis returns &lt;code>(error) OOM command not allowed when used memory &amp;gt; 'maxmemory'&lt;/code>. The server stays online; reads succeed, writes fail. If the client library suppresses errors, the first symptom may be missing data or backend load spikes. This occurs when &lt;code>used_memory&lt;/code> reaches &lt;code>maxmemory&lt;/code> and the eviction policy cannot free space. Under &lt;code>noeviction&lt;/code>, Redis rejects every write and keeps all keys. Under &lt;code>volatile-*&lt;/code>, the same happens when no keys carry a TTL. Monitoring often misses this because &lt;code>evicted_keys&lt;/code> stays at zero while &lt;code>used_memory&lt;/code> sits just below the limit.&lt;/p></description></item><item><title>Redis OOM-killed by the kernel: RSS, overcommit, and recovery</title><link>https://www.netdata.cloud/guides/redis/redis-out-of-memory-oom-killed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-out-of-memory-oom-killed/</guid><description>&lt;h1 id="redis-oom-killed-by-the-kernel-rss-overcommit-and-recovery">Redis OOM-killed by the kernel: RSS, overcommit, and recovery&lt;/h1>
&lt;p>Redis reports &lt;code>used_memory&lt;/code> at 60% of &lt;code>maxmemory&lt;/code>, then disappears. The container status is &lt;code>OOMKilled&lt;/code>, or &lt;code>dmesg&lt;/code> shows the kernel OOM killer selected &lt;code>redis-server&lt;/code>. The kernel enforces resident memory (RSS), while &lt;code>used_memory&lt;/code> and &lt;code>maxmemory&lt;/code> track logical allocator state. Fragmentation, copy-on-write pages during persistence, and client buffers inflate RSS above the logical figure most operators monitor. When RSS hits the host or cgroup memory ceiling, the kernel terminates the process even though Redis believes it is within limits.&lt;/p></description></item><item><title>Redis Pub/Sub pattern overhead: PSUBSCRIBE scaling and slow subscribers</title><link>https://www.netdata.cloud/guides/redis/redis-pubsub-pattern-overhead/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-pubsub-pattern-overhead/</guid><description>&lt;h1 id="redis-pubsub-pattern-overhead-psubscribe-scaling-and-slow-subscribers">Redis Pub/Sub pattern overhead: PSUBSCRIBE scaling and slow subscribers&lt;/h1>
&lt;p>You see Redis latency spikes that align with PUBLISH bursts. Subscribers disconnect with output buffer limit errors. In cluster mode, CPU and network climb linearly with node count even though PUBLISH volume stays flat. Two mechanisms drive this: PSUBSCRIBE pattern matching adds O(N) work to every PUBLISH, and slow subscribers accumulate per-client output memory until Redis cuts them off. This guide shows how to confirm the bottleneck, apply safe fixes, and decide when to move to sharded Pub/Sub.&lt;/p></description></item><item><title>Redis rdb_last_bgsave_status:err: diagnosing failed background saves</title><link>https://www.netdata.cloud/guides/redis/redis-rdb-last-bgsave-status-err/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-rdb-last-bgsave-status-err/</guid><description>&lt;h1 id="redis-rdb_last_bgsave_statuserr-diagnosing-failed-background-saves">Redis rdb_last_bgsave_status:err: diagnosing failed background saves&lt;/h1>
&lt;p>&lt;code>INFO persistence&lt;/code> returning &lt;code>rdb_last_bgsave_status:err&lt;/code> means the last background save failed. The flag is sticky: it remains &lt;code>err&lt;/code> until a subsequent &lt;code>BGSAVE&lt;/code> succeeds, so the failure may be hours old. If &lt;code>stop-writes-on-bgsave-error&lt;/code> is enabled (the default), Redis rejects writes and your application sees &lt;code>MISCONF&lt;/code> errors. If the setting is disabled, writes continue but durability is broken; the exposure window grows with every update.&lt;/p>
&lt;p>The failure modes are a narrow set: fork failure, disk full, filesystem write rejection, or child death before completion. Follow this sequence to separate them without restarting Redis.&lt;/p></description></item><item><title>Redis READONLY You can't write against a read only replica - causes and fixes</title><link>https://www.netdata.cloud/guides/redis/redis-readonly-cant-write-against-replica/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-readonly-cant-write-against-replica/</guid><description>&lt;h1 id="redis-readonly-you-cant-write-against-a-read-only-replica---causes-and-fixes">Redis READONLY You can&amp;rsquo;t write against a read only replica - causes and fixes&lt;/h1>
&lt;p>Your application hits &lt;code>(error) READONLY You can't write against a read only replica&lt;/code>. Writes fail; reads work. The connected Redis instance thinks it is a replica, so it rejects mutating commands. The replica is behaving correctly. The problem is a write-capable client routed to a node that is not the current primary. This typically happens in three situations: a routing bug that sends writes to a replica endpoint, stale client topology after a failover or upgrade, or an instance that was accidentally demoted at runtime.&lt;/p></description></item><item><title>Redis replication backlog overflow: full-resync storms and the 1MB default</title><link>https://www.netdata.cloud/guides/redis/redis-replication-backlog-overflow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-replication-backlog-overflow/</guid><description>&lt;h1 id="redis-replication-backlog-overflow-full-resync-storms-and-the-1mb-default">Redis replication backlog overflow: full-resync storms and the 1MB default&lt;/h1>
&lt;p>Replicas drop and reconnect, but each reconnection triggers a full resync instead of a partial sync. The primary forks for an RDB dump, latency spikes, and other replicas fall behind. Before recovery, another replica exceeds the backlog window and the cycle repeats. The default &lt;code>repl-backlog-size&lt;/code> of 1 MB triggers this cascade in most production workloads.&lt;/p>
&lt;p>The backlog is a fixed-size circular buffer of recent writes that lets a disconnected replica catch up without a full resync. When writes during a blip exceed the 1 MB default, the replica&amp;rsquo;s offset falls outside the window. Recovery requires a full resync, which forks the primary and turns a brief disconnect into a site-wide latency event.&lt;/p></description></item><item><title>Redis replication lag: detection, diagnosis, and fixes</title><link>https://www.netdata.cloud/guides/redis/redis-replication-lag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-replication-lag/</guid><description>&lt;h1 id="redis-replication-lag-detection-diagnosis-and-fixes">Redis replication lag: detection, diagnosis, and fixes&lt;/h1>
&lt;p>Reads from Redis replicas returning stale data indicate replication lag. Your monitoring shows a growing gap between the primary&amp;rsquo;s replication offset and what the replica has acknowledged. During failover, every byte of that gap is potential data loss.&lt;/p>
&lt;p>Replication lag in Redis is measured in bytes: the difference between &lt;code>master_repl_offset&lt;/code> on the primary and &lt;code>slave_repl_offset&lt;/code> on the replica. Small, stable lag is normal in asynchronous replication, but lag that grows continuously or exceeds &lt;code>repl-backlog-size&lt;/code> signals a bottleneck that can cascade into full resync storms.&lt;/p></description></item><item><title>Redis Sentinel triggering unnecessary failovers: quorum and split-brain</title><link>https://www.netdata.cloud/guides/redis/redis-sentinel-unnecessary-failover/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-sentinel-unnecessary-failover/</guid><description>&lt;h1 id="redis-sentinel-triggering-unnecessary-failovers-quorum-and-split-brain">Redis Sentinel triggering unnecessary failovers: quorum and split-brain&lt;/h1>
&lt;p>Your logs show a failover, but the old master never restarted. Or failovers flap: one node is promoted, then another, and clients see &lt;code>MASTERDOWN&lt;/code> and &lt;code>READONLY&lt;/code> while Sentinels disagree. The root cause is usually not the Redis data node. It is the Sentinel control plane: quorum too low, &lt;code>down-after-milliseconds&lt;/code> too aggressive, or a network partition that leaves Sentinels on the wrong side of the split.&lt;/p></description></item><item><title>Redis slowlog filling up: finding and fixing the slow commands</title><link>https://www.netdata.cloud/guides/redis/redis-slowlog-filling-up/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-slowlog-filling-up/</guid><description>&lt;h1 id="redis-slowlog-filling-up-finding-and-fixing-the-slow-commands">Redis slowlog filling up: finding and fixing the slow commands&lt;/h1>
&lt;p>Clients report timeouts and latency has a new plateau. Check &lt;code>SLOWLOG LEN&lt;/code>: if it is climbing or already at 128, the slowlog is filling. The slowlog is a circular buffer that logs commands whose execution exceeds &lt;code>slowlog-log-slower-than&lt;/code> (default 10 ms). Rapid rotation means entries evict before you inspect them, and every entry marks a blocked single-threaded event loop. Extract the culprits before the evidence disappears, distinguish execution time from queue wait, and stop the bleed.&lt;/p></description></item><item><title>Redis stale replica promotion: silent data loss at failover</title><link>https://www.netdata.cloud/guides/redis/redis-stale-replica-promotion-data-loss/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-stale-replica-promotion-data-loss/</guid><description>&lt;h1 id="redis-stale-replica-promotion-silent-data-loss-at-failover">Redis stale replica promotion: silent data loss at failover&lt;/h1>
&lt;p>After a Redis failover, the new primary accepts writes immediately and clients reconnect without errors. Writes that were acknowledged by the old primary but not yet replicated are gone. This is stale replica promotion.&lt;/p>
&lt;p>Redis replication is asynchronous by default. The primary persists a write locally, replies OK to the client, then streams the change to replicas. If the primary fails before a replica receives the outstanding writes, that replica never sees them. Sentinel or Redis Cluster promotes the best available replica. If that replica is lagging, the writes in the gap are permanently lost. The client receives no error and no log warns you. The data is simply missing.&lt;/p></description></item><item><title>Redis Stream consumer group lag: pending entries and dead consumers</title><link>https://www.netdata.cloud/guides/redis/redis-stream-consumer-group-lag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-stream-consumer-group-lag/</guid><description>&lt;h1 id="redis-stream-consumer-group-lag-pending-entries-and-dead-consumers">Redis Stream consumer group lag: pending entries and dead consumers&lt;/h1>
&lt;p>Stream processing falls behind. An alert fires on &lt;code>used_memory&lt;/code>, or your application dashboard shows lag. You run &lt;code>XINFO GROUPS&lt;/code> and see &lt;code>lag&lt;/code> or &lt;code>pending&lt;/code> climbing. One means consumers cannot keep up. The other means they are not acknowledging messages. Both increase memory pressure, but they have different fixes. This guide shows how to tell them apart, find dead consumers, and clean up the Pending Entry List before it becomes a memory incident.&lt;/p></description></item><item><title>Redis sync_full incrementing: diagnosing full resync events</title><link>https://www.netdata.cloud/guides/redis/redis-full-resync-storms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/redis/redis-full-resync-storms/</guid><description>&lt;h1 id="redis-sync_full-incrementing-diagnosing-full-resync-events">Redis sync_full incrementing: diagnosing full resync events&lt;/h1>
&lt;p>Your Redis primary&amp;rsquo;s &lt;code>sync_full&lt;/code> counter is climbing. That means replicas are performing full resyncs instead of partial ones. Each full resync forces the primary to fork, write an RDB snapshot, and push it to the replica, which then wipes its own dataset and reloads from scratch. One full resync is a heavy operation. Several in succession, or multiple at once, can freeze the primary&amp;rsquo;s event loop, spike memory via copy-on-write, and trigger a cascade where more replicas fall behind and also need full resyncs.&lt;/p></description></item></channel></rss>