"SERVER_ERROR out of memory" when changing cache entry pattern
dustin at spy.net
Wed Aug 29 17:14:13 UTC 2007
On Aug 29, 2007, at 2:44 , Alexander Zaitsev wrote:
> Here is how it happened. Cache was full with more or less uniform
> objects: long key and boolean value. I have switched the pattern of
> cache entries that my application generates to have shorter key but
> hundred bytes value. This resulted in immediate "out of memory" on
> storing any new value in the cache. Looks like memcached could not
> allocate space for the bigger object than cache contained before. I.e.
> it tried to release LRU entries, but it was not enough to get the
> required space, because old entries were significantly smaller than
This is more likely due to suboptimal slab classes. If you start
memcached with -vv you'll see the slab definitions. You'll want a
pretty small chunk growth factor for uniform entries like that.
BTW, I'd strongly recommend not running memcached (or any other
process when you can avoid it) as root.
More information about the memcached