OOM: OOM command not allowed when used memory > 'maxmemory'
RedisWhat does it mean?
Memory used by Redis has reached the maxmemory limit and write commands are rejected because the eviction policy cannot free space for new data. Memory is full; writes are not possible.
Why does it happen?
The maxmemory limit is exceeded, the noeviction policy is selected (no key is ever removed), data without TTL keeps growing, a memory leak, or insufficient RAM for the limit.
How to fix it
Inspect memory usage: INFO memory and MEMORY USAGE. Choose an appropriate eviction policy (e.g. allkeys-lru or volatile-lru): CONFIG SET maxmemory-policy allkeys-lru. Set TTLs on keys so they are cleaned up automatically. Increase maxmemory/RAM. Find and shrink big keys (redis-cli --bigkeys). Purge unnecessary data.
More from this engine
- WRONGTYPEWRONGTYPE Operation against a key holding the wrong kind of value
- NOAUTHNOAUTH Authentication required
- WRONGPASSWRONGPASS invalid username-password pair or user is disabled
- READONLYREADONLY You can't write against a read only replica
- MASTERDOWNMASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'