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

- **ID:** `data/redis-oom-command-not-allowed`
- **Domain:** data
- **Category:** resource_error
- **Error Code:** `OOM`
- **Verification:** ai_generated
- **Fix Rate:** 87%

## Root Cause

Redis reaches its configured maxmemory limit and the eviction policy is set to noeviction, causing write commands to fail with OOM error.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Redis 6.2 | active | — | — |
| Redis 7.0 | active | — | — |
| Redis 7.2 | active | — | — |

## Workarounds

1. **Change the eviction policy to allkeys-lru to automatically evict least recently used keys when memory is full.** (93% success)
   ```
   Change the eviction policy to allkeys-lru to automatically evict least recently used keys when memory is full.
   ```
2. **Add more RAM to the server and increase maxmemory to a safe limit below total RAM.** (85% success)
   ```
   Add more RAM to the server and increase maxmemory to a safe limit below total RAM.
   ```

## Dead Ends

- **** — Without setting an eviction policy, Redis will fill up again quickly. (85% fail)
- **** — If the system has no free RAM, Redis will swap to disk, severely degrading performance. (75% fail)
