[Mongrel] memcache and mongrel_cluster configuration question

Reese, Terry terry.reese at oregonstate.edu
Tue Aug 21 02:48:03 EDT 2007


>>Your key to debugging this is going to be using the -vv option to
>>memcached to monitor the getting & setting of key/value pairs. I
>>suspect it has to do with the memcache namespace. 
 
I hadn't thought of that -- I'll do that.
 
>>Additionally, you'd do best to serialize only the most basic of
>>variables to sessions; I'd stick with Fixnums & Strings. Anything else
>>is trouble, and trouble that doesn't always give you a nice error
>>message. 
 
Well, our intention is to eventually remove all to most of the sessioning components.  Unfortunately, it can't happen tomorrow, so I'm stuck trying to figure this out.  And to be fair, we are only storing one string and two Fixnums as session variables.  We just need those variables to always be set correctly. :)  Hopefully, I'll be able to get a better idea of what's happening by watching the memcache though.
 
Thanks, 
 
--TR
 
*******************************************
Terry Reese
Cataloger for Networked Resources
Digital Production Unit Head
Oregon State University Libraries
Corvallis, OR  97331
tel: 541-737-6384
email: terry.reese at oregonstate.edu
http: http://oregonstate.edu/~reeset
*******************************************

________________________________

From: mongrel-users-bounces at rubyforge.org on behalf of Erik Hetzner
Sent: Mon 8/20/2007 5:47 PM
To: mongrel-users at rubyforge.org
Subject: Re: [Mongrel] memcache and mongrel_cluster configuration question



At Mon, 20 Aug 2007 17:05:04 -0700,
"Reese, Terry" <terry.reese at oregonstate.edu> wrote:
>
> I'm assuming that what I'm trying to do is a fairly common on this list,
> so I'm hoping someone can help me out.  We are deploying a rails app.
> using multiple mongrels, managed by mongrel_cluster and apache's
> mod_balancer.  All config information is below.  As part of our setup,
> we use memcache for sessioning -- which is my current problem.  Sessions
> are being set, however, it seems that each mongrel instance is
> maintaining its own copy of the session data (does that make sense?).
> What I'm seeing is that as data is being placed into session variables,
> occasionally, an older instance of a session variable will be
> resurrected.  So if I'd placed "water" in a session variable to be used
> for some action and then placed "fish" in the session variable to use
> for some actions -- when I do those actions, sometimes I'm getting
> "water" back when I query the session variable.  It's almost like each
> mongrel instance is using it's own "memcache" -- which doesn't make
> sense because we only have a single memcache server running.

> [...]

Your key to debugging this is going to be using the -vv option to
memcached to monitor the getting & setting of key/value pairs. I
suspect it has to do with the memcache namespace.

Additionally, you'd do best to serialize only the most basic of
variables to sessions; I'd stick with Fixnums & Strings. Anything else
is trouble, and trouble that doesn't always give you a nice error
message.

best,
Erik Hetzner

;; Erik Hetzner, California Digital Library
;; gnupg key id: 1024D/01DB07E3


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070820/db813e54/attachment.html 


More information about the Mongrel-users mailing list