the problem is with the way you are setting up your memcached connection

You are running on a mongrel cluster, but each server in the cluster
is configured to connect only to the locally running memcached
(127.0.0.1). That is why you are having problems with storing your
session. you are using 4 different memcache pools, one on each server,
instead of one large pool.

CACHE.servers = '127.0.0.1:11211'

should be a complete list of your servers . something like this:

CACHE.servers =
'10.10.10.1:11211,10.10.10.2:11211,10.10.10.3:11211,10.10.10.4:11211'

--
Jehiah

On 5/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Eric,

  here are my current stats:
  Rails: 1.2.3
  Memcached: 1.2.2
  memcached-client: 1.3.0
  mongrel_cluster: 0.2.1

As for configuration, I just added the following in the single environment.rb 
of the rails app
########################
require_gem 'memcache-client'
#...other codes...
#uncommented and changed....
config.action_controller.session_store = :mem_cache_store
#...other codes...
memcache_options = {
  :c_threshold => 10_000,
  :compression => true,
  :debug => false,
  :namespace => 'My_Rails_App',
  :readonly => false,
  :urlencode => false
}

CACHE = MemCache.new memcache_options
CACHE.servers = '127.0.0.1:11211'
ActionController::Base.session_options[:expires] = 1800
ActionController::Base.session_options[:cache] = CACHE
########################

Please point out anything wrong that I did.  Thanx a million!

Eric Hodel <[EMAIL PROTECTED]> wrote:
 On May 12, 2007, at 08:39,
[EMAIL PROTECTED]> wrote:

> Hi, what do you mean by 'which client'?
>
> Well, I have set Apache to virtual host a cluster of 4 mongrels,
> and the problem about session handling appears, when I try to uses
> memcached to hold the sessions.

Mongrel is not a memcache client, so you're using some other piece of
software to connect whatever mongrel is running to memcached.

> If I just use just 1 instance of mongrel, it works. Note that I
> have no problems using the default PStore, in both single mongrel
> instance and mongrel clusters.

AFAIK, PStore is ruby-specific, so you're running a ruby memcached
client.  What is its name  and version?  How do you have it configured
on each mongrel?

> This happens in both IE and Firefox too. Please help! =)
>
> Eric Hodel  wrote: On May 11, 2007, at 01:19,
> [EMAIL PROTECTED]> wrote:
>
> > Greetings group!
> >
> > Anyone who had problems and hopefully with a solution to why
> > Memcache 1.2.2 does not seem to work with a Mongrel Cluster? It
> > works fine when I use it with just one Mongrel instance, but with a
> > cluster, the sessions keep getting lost.
>
> Which client?



Reply via email to