Senior
What will happen to Redis and clients if Redis is full and eviction policies are disabled?
sobes.tech AI
Answer from AI
If Redis is filled to the maximum memory limit and eviction policies are disabled (i.e., configured as maxmemory-policy noeviction), Redis will stop accepting commands that require additional memory allocation.
In this state:
- Redis will return an error to clients when attempting to write new data (e.g., SET, HSET, etc.).
- Clients attempting such operations will receive the error "OOM command not allowed when used memory > 'maxmemory'".
- Read operations (GET and similar) will continue to work normally.
Thus, Redis will not automatically delete old keys, and the application must handle write errors itself and take measures (such as clearing cache or increasing memory limit).