How do I resolve the error message "OOM command not allowed" for an ElastiCache for Redis cluster node?
3 minute read
I received the "OOM command not allowed when used memory greater than 'maxmemory'" error when querying my Amazon ElastiCache for Redis cluster node? How do I resolve this?
An OOM error occurs when an ElastiCache for Redis cluster can't free any additional memory.
ElastiCache for Redis implements the maxmemory-policy that's set for the cache node’s parameter group when out of memory. The default value (volatile-lru) frees up memory by evicting keys with a set expiration time (TTL value). When a cache node doesn't have any keys with a TTL value, it returns an error instead.
To resolve this error and to prevent clients from receiving OOM command not allowed error messages, do some combination of the following:
Set a TTL value for keys on your node.
Update the parameter group to use a different maxmemory-policy parameter.
Delete some existing keys manually to free up memory.
Choose a larger node type.
Note: The exact combination of the resolutions you use depends on your particular use case.