OOM command not allowed 🟥 Redis

Redis: OOM command not allowed when used memory > 'maxmemory'

Redis reached its maxmemory limit and the eviction policy (noeviction) refuses new writes.

Seen on: Redis

Meaning

With maxmemory-policy noeviction (default), writes fail when memory is full. Caches should use an LRU/LFU policy; data stores need more memory or less data (TTL on keys).

Common causes

  • maxmemory reached with noeviction policy
  • Keys without TTL growing forever
  • Large values/collections
  • Memory fragmentation

⚡ Quick fix

  1. Set an eviction policy for caches (allkeys-lru)
  2. Add TTLs to cache keys
  3. Increase maxmemory / instance size

Detailed fix by platform

Shell

  1. bash
    redis-cli INFO memory | grep -E 'used_memory_human|maxmemory_human|maxmemory_policy'
    redis-cli CONFIG SET maxmemory-policy allkeys-lru
    redis-cli --bigkeys

How to diagnose

  1. Memory — used vs maxmemory
  2. Policy — maxmemory-policy
  3. Keys — Big keys / no TTL

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.