Question

I run a lamp stack of a couple of application servers which used a single dedicated memcache server for hosting sessions. The problem is that the items in the cache increase in a steady almost linear pace. This worries me. I figured that when the cache fills out the oldest entries will be overwritten and there shouldn't be a problem. But it seems impossible to gain any insight in the actual usage.

The versions I use are as following:

server-side:

  • Ubuntu 10.04
  • memcached 1.4.2

application-side:

  • ubuntu 10.04
  • php 5.3.2
  • libmemcached-0.44
  • pecl memcached 1.0.2

I've also tried this setup with pecl memcached 2.0.0b1, pecl memcache 2.2.6 and build against libmemcached-0.49 of which only the last had a minor impact at all. Is this behavior normal and as intended or would this be a failure of session_destroy?

Was it helpful?

Solution

Regrettably it was my own misunderstanding of memcached which gave me a wrong impression about the behavior. After some additional research I came across two (1, 2) articles which clarified the internal workings for me.

Garbage will not be collected. This still doesn't give me insight in the actual usage but at least takes away some worries. As long as I don't get evictions it should be just fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top