Memcache running out of Memory?

From Brian Nelson Ramblings
Jump to: navigation, search

Memcache running out of Memory, how to check

To check and see if memcached is running out of space you would check for evictions, evictions will happen when the memory pool is all used up and before it accepts anything new it needs to make room by evicting older content.

You can run the following command and look for the evictions

echo 'stats' | nc localhost 11211


echo 'stats' | nc -U /path/to/the/memcached.sock

You will get about a page full of information, but you are looking for the one that reads

STAT evictions 0

Mine has come back as a zero, meaning that it has not ran out of memory and needed to evict older content.