[Mongrel] Mongrel and MemcacheSessionStore
franck.dagostini at gmail.com
Mon Feb 5 07:46:42 EST 2007
I experienced Tiago's problem.
I store in session a little string telling the application what's the
current language (e.g 'fr' for french).
Users kept being switched back to default language because the session ends
prematurely. Playing with memcache expiration time don't solve the issue. I
switch to SQLSessionStore and the problem is gone.
Like Tiago, I am in production environment with a bunch of mongrel behind a
load balancer (apache2).
As my sysadmin skill isn't that good, I didn't investigate further and I
will stay with SQLSessionStore.
y sysadmin skilled
On 2/5/07, Joey Geiger <jgeiger at gmail.com> wrote:
> I like this idea, do you have an example or suggestions on how you
> could implement it easily?
> On 2/4/07, snacktime <snacktime at gmail.com> wrote:
> > > The application in question was running fine in the production
> > > environment with SQLSessionStore and using a mongrel cluster behind a
> > > load balancer. However, by switching to a MemcacheSessionStore (using
> > > either memcache-client or Ruby-MemCache), users kept being logged out
> > > due to the fact that the processes lost their connection to the
> > > server (they reconnected but the users were already "logged out").
> > Personally, I wouldn't ever use memcache without a persistent backing
> > store for sessions. It works best when writes always hit memcache
> > and the backing store, and reads check memcache first then fall back
> > to the persistent store. Assuming a normal scenario where you aren't
> > writing to the session store that often, then your cache hit rate will
> > still be pretty good and your site won't stop working if memcache
> > fails.
> > Chris
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users