[horde] memcache session tracking

Andrew Morgan morgan at orst.edu
Tue Oct 14 00:21:00 UTC 2008


Is anyone successfully using the memcache session tracking 
($conf['sessionhandler']['params']['track'] = true  with memcache 
sessions)?

It seems to work on a lightly loaded test system I have.  It will display 
session information for logged in folks.

On our production system (3 frontends, several million hits a day), it 
will never contain any session older than a few seconds.  I wrote a small 
command line php script to fetch the tracking variable from memcache and 
parse it.  Successive runs output:

webmail4:/private/admin# php session_count.php
Found sessions.
array(3) {
   ["2427e1d36ffa5a7b3fb4b6a709907a97"]=>
   int(1223943400)
   ["d978d68aca74351c25543e5b65cba284"]=>
   int(1223943400)
   ["75fca5d8bfb8e2f6789b88d8d1c85104"]=>
   int(1223943401)
}
Total Sessions: 3
Authenticated Sessions: 2


webmail4:/private/admin# php session_count.php
Found sessions.
array(4) {
   ["2427e1d36ffa5a7b3fb4b6a709907a97"]=>
   int(1223943400)
   ["d978d68aca74351c25543e5b65cba284"]=>
   int(1223943400)
   ["75fca5d8bfb8e2f6789b88d8d1c85104"]=>
   int(1223943401)
   ["ea2a5c6fdbf09a46fb8b09f190e4696f"]=>
   int(1223943402)
}
Total Sessions: 4
Authenticated Sessions: 2


webmail4:/private/admin# php session_count.php
Found sessions.
array(4) {
   ["362415f027bf0d9d0020b8e996ffd381"]=>
   int(1223943404)
   ["f635e9ff1c8995a7b252996c8e3674fc"]=>
   int(1223943404)
   ["315b7bd0a4dfdf3f531a9840e3922d42"]=>
   int(1223943404)
   ["c7c8bdb59270d3c9199fad8b05254e20"]=>
   int(1223943404)
}
Total Sessions: 4
Authenticated Sessions: 1


Could this be a garbage collection problem?

I would like to get a count of authenticated sessions in order to track 
usage patterns over time.  Has anyone else using memcache for sessions 
found a way to do this?

Thanks,
 	Andy


More information about the horde mailing list