Memcached bucket / Expiration
Hi,
We have a Couchbase cluster with a Memcached bucket.
This bucket is filled by webservers with data coming from DB.
All our cached items have an expiration time of 12 hours.
The strange thing is that the number of cached items continues to increment after several days of use. The RAM used decreases sometimes, but not the number of items.
Plus, even if the RAM used decreases, it continues to grow day by day, and never stabilizes...
I read that MemBase had an "expiry task" running each hour to clean memory from expired items, but here it seems to just increase... do I miss something ?
RAM Used

Items

Hello,
This is the expected behavior for Memcache bucket. The items are removed from the RAM in two cases:
- when an expired item is accessed (if your application is doing a get of a key that is expired it will return a not founf/null and remove the item from the RAM
- when the bucket has no RAM it will automatically remove some expired items to be able to store new items.
This is different in the case of Couchbase Buckets, this type of bucket use the "expiry task" to remove the expired item from the RAM (and disk).
The important part here is that, with both bucket types, the application cannot access expired items.
Regards
Tug
hi tgrall,
thx for your answer, it's clear now :)
BTW, more information about the Couchbase bucket expiry pager and how it works is available here:
http://www.couchbase.com/docs/couchbase-devguide-2.0/about-ttl-values.html
Configuration for special cases: http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-cbepc...
Anybody can help ?