Memcached as a Sessions Store (etc)

Janning Vygen vygen at
Thu Jun 29 07:22:52 UTC 2006

Am Mittwoch, 28. Juni 2006 22:30 schrieb timeless:
> What prompted the Memcached as sessions store:

We used memcached as as session storage but it fails (without facebook patch, 
just debian stable package)

In my understanding there are two points:

1. You will never have a garanteed session time because older session data is 
pushed out of memory if new data comes in and no expired slab is available. 
Of course you can get around with more memory, but it doesn't make sense in 
my opinion to run mor (expensive) memory for session data which is quite old 
(say 40 minutes of a 60 minutes expiration time). Usually this data is not 
needed anymore.

2. If your session data varies in size and you have all slabs allocated, 
memcached will report "out of memory" error (without facebook patch) and your 
user can't login. This happens to us after a few days running memcached 
without problems.

See for further discussion: 

We now use sharedance. We are very happy with it. It runs on our dedicated 
session server with a higher load than memcached because of IO traffic but 
runs without problems.

kind regards

PLANWERK 6 websolutions
Venloer Straße 8, 40477 Düsseldorf
Tel: (0211) 302666-0
Fax: (0211) 302666-10

More information about the memcached mailing list