Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memcached Settings for stopping key expiration

Tags:

memcached

I want to know is there any way for Memcached to stop its LRU collection of keys so that i can find at what point the given memory allocated for memcached gets full.

I dont want memcached to flush the old keys when it goes out of space.


1 Answers

Use the -M switch, and memcached will return an error when the memory is exhausted instead of removing items.

Example:

memcached -d -m 1000 -M

This runs memcached daemonized with maximum memory of 1000 MB. It will return an error when the 1000 MB are consumed.

like image 50
mb. Avatar answered Nov 28 '25 16:11

mb.