6.0.0-beta1
11/4/25

[#5450] memcache session tracking
Summary memcache session tracking
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester adrieder (at) sbox (dot) tugraz (dot) at
Created 06/11/2007 (6721 days ago)
Due
Updated 06/12/2007 (6720 days ago)
Assigned 06/11/2007 (6721 days ago)
Resolved 06/12/2007 (6720 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/12/2007 02:06:24 PM Jan Schneider State ⇒ Not A Bug
 
06/11/2007 11:07:50 PM adrieder (at) sbox (dot) tugraz (dot) at Comment #5 Reply to this comment
you are right. It seems to be a combination of a limitation of default 
memcached and the ignorance of many users who just are not willing to 
click on the logout button.

And, yes I have now seen the "gc - TODO" comment in the source.



Too bad that the work around requires "hacking" the source code of 
memcached. This is even not documented, as far as I know. I guess in 
case of problems the memcached guys will tell us that this hack is not 
official and so unsupported.



A comment in slab.c says:

[...]

The last  slab size is always 1MB, since that's the maximum item size 
allowed by the memcached protocol.


06/11/2007 10:44:57 PM Chuck Hagenbuch State ⇒ Feedback
 
06/11/2007 10:13:46 PM Michael Slusarz Comment #4 Reply to this comment
Also, 1MB is (obviously) not a hard & fast limit, as this post makes clear:

http://lists.danga.com/pipermail/memcached/2006-January/001879.html
06/11/2007 10:10:19 PM Michael Slusarz Comment #3 Reply to this comment
How many users do you have?  If you truly have tens of thousands of 
active users, and there really is a hard 1MB limit in memcache, there 
doesn't seem to be anything we can do about this.



If your sessions are not being terminated correctly - i.e. your users 
are not logging out properly - then you will probably need to run some 
sort of garbage collection method manually right now to clean out 
these old entries.  As the code indicates - garbage collection for 
session information in the class is todo, but hasn't yet been 
implemented.
06/11/2007 10:08:48 PM adrieder (at) sbox (dot) tugraz (dot) at Comment #2 Reply to this comment
'horde_memcache_sessions_track'  can get / gets bigger than 1048576
bytes, which is the protocol defined object size for storable objects
in memcached.
It is of course the max. object size defined by the memcache protocol.



Didi



BTW: this can also happen in other places e.g. composing a message
06/11/2007 09:10:08 PM adrieder (at) sbox (dot) tugraz (dot) at Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ memcache session tracking
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
Reply to this comment
'horde_memcache_sessions_track'  can get / gets bigger than 1048576 
bytes, which is the protocol defined object size for storable objects 
in memcached.

When this happens, session tracking using memcached is not working 
correctly. I get a lot of errors of the following kind:



Mon Jun 11 23:07:52 2007] [error] [client xxx.xxx.xxx.xxx] PHP Notice: 
  Memcache::set() [<a 
href='function.Memcache-set'>function.Memcache-set</a>]: marked server 
'xxx.xxx.xxx.xxx:11211' as failed in 
/usr/local/lib/php/Horde/Memcache.php on line 151



And, YES I enabled compression.

Saved Queries