Redis Out Of Memory error

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com

Interesting:

I’m getting “OOM command not allowed” when trying to set a key, maxmemory is set to 500M with maxmemory-policy “volatile-lru”, I’m setting TTL for each key sent to redis.

info command returns : used_memory_human:809.22M

If maxmemory is set to 500M, how did I reached 809M ?
Info command does not show any Keyspaces , how is it possible ?
keys * returns “(empty list or set)” ,I’ve tried to change db number , still no keys found.
Here is info command output:

redis-cli -p 6380 redis 127.0.0.1:6380> info

Possible answer:

Redis’ maxmemory volatile-lru policy can fail to free enough memory if the maxmemory limit is already used by the non-volatile keys.

Source