Reputation: 13111
I have a Redis server with maxmemory 512MB
and maxmemory-policy allkeys-lru
but once the server has filled up after a day of usage, I can't add any more items:
redis 127.0.0.1:6379[3]> set foooo 123
(error) OOM command not allowed when used memory > 'maxmemory'.
IMHO that never should happen with the LRU policy.
I copied some server info to this Pasebin: http://pastebin.com/qkax4C7A
How can I solve this problem?
Note: I'm trying to use maxmemory
because my Redis server is continously eating up memory even though nearly all keys have an expire setting and because FLUSHDB
does not release system memory - perhaps this is related..
In the end I'm trying to use Redis as a cache.
Upvotes: 3
Views: 2210
Reputation: 49942
Your info
output suggests that a lot of your server's memory is taken by Lua scripts:
used_memory_lua:625938432
Note that Lua scripts remain in memory until the server is restarted or SCRIPT FLUSH
is called. It would appear as if you're generating Lua scripts on the fly...
Upvotes: 4