[horde] Session issues?
Michael M Slusarz
slusarz at horde.org
Fri Aug 29 07:12:20 UTC 2008
Quoting Michael M Slusarz <slusarz at horde.org>:
> Quoting Kevin Konowalec <webadmin at ualberta.ca>:
>
>>
>> On Aug 28, 2008, at 7:16 PM, Steve Devine wrote:
>>>>
>>> Whats this set for in horde/config/conf.php ?
>>> $conf['session']['timeout'] =
>
> [snip]
>
>> It is set to 0. I haven't changed it from the default. Is that a
>> total session timeout or an inactivity timeout?
>
> For memcache, the important setting is 'session.gc_maxlifetime'
> which is located in php.ini. Although looking at the description,
> this may not be the proper setting:
>
> session.gc_maxlifetime specifies the number of seconds after which
> data will be seen as 'garbage' and cleaned up. **Garbage collection
> occurs during session start.**
>
> For memcache, we have no control over when garbage collection
> occurs, so using it in this manner for the memcache session handler
> is not proper. We probably need an explicit lifetime configuration
> option in the memcache session driver.
This is what I came up with:
http://lists.horde.org/archives/cvs/Week-of-Mon-20080825/082646.html
Essentially, removed all lifetime calls from memcache driver because
memcache doesn't care about garbage collection - it will gc
automatically when the pool is full. Thus, using
session.gc_maxlifetime doesn't make much sense to use here.
A couple of other points, while on the memcache topic. First, 6GB of
memcache seems a little low for a decent sized installation,
especially if using memcache as the caching driver. Even if you have
32-bit machines, you can still get 3GB+ per machine easily. Or,
better yet, take the splurge and buy a couple of cheap 64-bit boxes
instead. The great thing about memcache is that it doesn't need
powerful, server-grade hardware to run. In fact, that is overkill.
Any cheap 64-bit box is going to be plenty powerful enough to handle
the memcache load. Quite honestly, your bottleneck will come from the
network traffic to/from the memcache server/PHP server, and most
likely the network infrastructure will be the limiting factor, not the
network I/O speed on any given interface card.
Also, absolutely no reason to reboot memcache every night. In fact, I
highly recommend you don't, especially if you are caching with
memcache also. Rebooting simply loses all those hardearned
mailbox/message caches that your servers labored to build every day.
This stuff should probably go in the wiki/FAQ. But I've been dealing
with the DNC all week and I am beat so maybe someone else could be
kind enough to start a page and stick it up there.
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the horde
mailing list