Mongrel Instance Problems
catandmao-reg at yahoo.com
catandmao-reg at yahoo.com
Mon May 14 15:00:41 UTC 2007
Hi Jehiah,
I am running just one memcached server, on the same machine as the cluster of 4 instances. That is why I entered the localhost ip. Everything here is in one server. Don't really understand why do I still have to expand the Cache.servers.
Glad that this is going somewhere. Thanx for the help guys.
Jehiah Czebotar <jehiah at gmail.com> wrote: 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, catandmao-reg at yahoo.com 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 wrote:
> On May 12, 2007, at 08:39,
> reg at yahoo.com> 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,
> > reg at yahoo.com> 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?
>
>
>
---------------------------------
Real people. Real questions. Real answers. Share what you know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070514/562b47f0/attachment.htm
More information about the memcached
mailing list