Skip to main content
SRE

Redis

Redis memory high

warning

Overview

What does this alert mean?

Redis memory usage exceeds 90% of maxmemory.

Contributing factors

  • No TTL set on keys — keys accumulate indefinitely
  • Sudden data ingestion spike
  • Eviction policy not configured or misconfigured

Affected components

  • Redis key eviction behavior
  • Application services relying on data persistence in Redis

Expected action

Review eviction policy and key TTLs. If memory is genuinely exhausted, increase maxmemory or add a node.

Services

Metrics

Metric

redis_memory_used_bytes / redis_config_maxmemory

Description & unit

Ratio of used memory to configured maxmemory.

Unit: ratio (0–1), alert threshold at 0.9

Threshold rationale

At 90% of maxmemory, Redis is close to either evicting keys aggressively or refusing writes (noeviction).

Normal behavior

For a cache workload, 70–85% is expected. For a persistent store, it should stay well below maxmemory.

Screenshots

Dashboard when memory ratio exceeds 90%
Dashboard when memory ratio exceeds 90%
Dashboard after memory drops below threshold
Dashboard after memory drops below threshold

Alert Behavior

Silencing

Silence during bulk data loads when temporary high memory is expected.

Expected frequency

Occasional — typically precedes a Redis down event if not addressed.

Severities

Severity guidance

Warning. Escalate if memory reaches 100% and eviction policy is noeviction.

Impacted users

Users of services that store data in Redis.

Things to check to determine severity

  • What is the eviction policy? (`redis-cli CONFIG GET maxmemory-policy`)
  • Are there keys with no TTL? (`redis-cli INFO keyspace`)

Verification

Prometheus query

redis_memory_used_bytes / redis_config_maxmemory > 0.9

Dashboards

  • Redis Memory — Fill in: dashboard URL

Troubleshooting

Steps

  1. 1Check memory stats: redis-cli INFO memory | grep -E 'used_memory_human|maxmemory_human|mem_fragmentation_ratio'
  2. 2Check eviction policy: redis-cli CONFIG GET maxmemory-policy
  3. 3Check key distribution and TTLs: redis-cli INFO keyspace
  4. 4Find large keys (use carefully on production): redis-cli --bigkeys
  5. 5If no eviction policy, set one for cache workloads: redis-cli CONFIG SET maxmemory-policy allkeys-lru

Useful commands

redis-cli INFO memoryredis-cli CONFIG GET maxmemory-policyredis-cli INFO keyspaceredis-cli --bigkeys

Possible Resolutions

  • Keys with no TTL accumulated over weeks. Added TTL to the offending key pattern and memory normalized.

Dependencies

  • Application key write patterns
  • Redis maxmemory configuration

Escalation

Guidance

Escalate if memory hits 100% with noeviction policy — writes will start failing.

Slack channels

  • #infrastructure-oncall — Fill in: channel URL

Definitions

Alert rule

Fill in: link to the alert rule in _data/rules.yml on GitHub

Tuning notes

The 90% threshold is a ratio of maxmemory — self-normalizing. Only adjust if your eviction policy safely handles higher saturation.

Related Links

Related alerts

Template adapted from https://runbooks.gitlab.com/template-alert-playbook/