RedisMemoryHigh
Redis is using nearly all of the memory allowed by its maxmemory setting.
| Severity | warning |
| Source | oliver006/redis_exporter 1.50+ |
| Key metrics | redis_memory_used_bytes, redis_memory_max_bytes |
What it means
The alert compares used memory with the configured maxmemory and fires when usage has stayed close to the limit for several minutes. Instances without a maxmemory limit are ignored (they can still be killed by the OS or container limit, which this alert cannot see).
What happens at the limit depends on maxmemory-policy. With noeviction, writes fail with OOM command not allowed when used memory > 'maxmemory'. With an allkeys-* or volatile-* policy, Redis evicts keys, which is fine for a pure cache but data loss for anything else.
Common causes
- Organic data growth without a matching capacity increase.
- Keys written without a TTL, or TTLs much longer than intended.
- A few very large keys: unbounded lists, sets or hashes used as queues or logs.
- Client output buffers growing (slow subscribers,
MONITOR, big replies). - High fragmentation after heavy churn.
First checks
- Read the memory breakdown and the policy:
redis-cli -h <host> INFO memory | grep -E '^(used_memory_human|used_memory_rss_human|maxmemory_human|maxmemory_policy|mem_fragmentation_ratio|mem_clients_normal)' redis-cli -h <host> CONFIG GET maxmemory-policy - Ask Redis for its own diagnosis:
redis-cli -h <host> MEMORY DOCTOR - Find the largest keys (uses
SCAN, safe on production but adds some load):redis-cli -h <host> --bigkeys redis-cli -h <host> --memkeys - Check how many keys lack an expiry, per database:
redis-cli -h <host> INFO keyspaceCompare
keys=withexpires=for eachdb. - Look at the growth trend to estimate time to full:
deriv(redis_memory_used_bytes[1h])
Fixing it
Short term, raise maxmemory with CONFIG SET maxmemory <bytes> if the host or container has headroom (keep room for fork during persistence). Delete or trim unbounded keys with UNLINK rather than DEL to avoid blocking. Longer term, add TTLs, cap collections, choose a policy that matches the use case, and shard or scale up.
Related alerts
- RedisKeyEvictions: what happens next under an eviction policy.
- RedisRdbLastSaveFailed: fork for snapshots can fail when memory is tight.
- RedisDown: an OOM kill takes the instance down.