Hi Jehiah,<br><br> 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.<br><br>Glad that this is going somewhere. Thanx for the help guys.<br><br><b><i>Jehiah Czebotar <jehiah@gmail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> the problem is with the way you are setting up your memcached connection<br><br>You are running on a mongrel cluster, but each server in the cluster<br>is configured to connect only to the locally running memcached<br>(127.0.0.1). That is why you are having problems with storing your<br>session. you are using 4 different memcache pools, one on each server,<br>instead of one large pool.<br><br>CACHE.servers = '127.0.0.1:11211'<br><br>should be a complete list
of your servers . something like this:<br><br>CACHE.servers =<br>'10.10.10.1:11211,10.10.10.2:11211,10.10.10.3:11211,10.10.10.4:11211'<br><br>--<br>Jehiah<br><br>On 5/13/07, catandmao-reg@yahoo.com <catandmao-reg@yahoo.com> wrote:<br>> Hi Eric,<br>><br>> here are my current stats:<br>> Rails: 1.2.3<br>> Memcached: 1.2.2<br>> memcached-client: 1.3.0<br>> mongrel_cluster: 0.2.1<br>><br>> As for configuration, I just added the following in the single environment.rb of the rails app<br>> ########################<br>> require_gem 'memcache-client'<br>> #...other codes...<br>> #uncommented and changed....<br>> config.action_controller.session_store = :mem_cache_store<br>> #...other codes...<br>> memcache_options = {<br>> :c_threshold => 10_000,<br>> :compression => true,<br>> :debug => false,<br>> :namespace => 'My_Rails_App',<br>> :readonly => false,<br>> :urlencode =>
false<br>> }<br>><br>> CACHE = MemCache.new memcache_options<br>> CACHE.servers = '127.0.0.1:11211'<br>> ActionController::Base.session_options[:expires] = 1800<br>> ActionController::Base.session_options[:cache] = CACHE<br>> ########################<br>><br>> Please point out anything wrong that I did. Thanx a million!<br>><br>> Eric Hodel <drbrain@segment7.net> wrote:<br>> On May 12, 2007, at 08:39,<br>> reg@yahoo.com> wrote:<br>><br>> > Hi, what do you mean by 'which client'?<br>> ><br>> > Well, I have set Apache to virtual host a cluster of 4 mongrels,<br>> > and the problem about session handling appears, when I try to uses<br>> > memcached to hold the sessions.<br>><br>> Mongrel is not a memcache client, so you're using some other piece of<br>> software to connect whatever mongrel is running to memcached.<br>><br>> > If I just use just 1 instance of mongrel, it works. Note
that I<br>> > have no problems using the default PStore, in both single mongrel<br>> > instance and mongrel clusters.<br>><br>> AFAIK, PStore is ruby-specific, so you're running a ruby memcached<br>> client. What is its name and version? How do you have it configured<br>> on each mongrel?<br>><br>> > This happens in both IE and Firefox too. Please help! =)<br>> ><br>> > Eric Hodel wrote: On May 11, 2007, at 01:19,<br>> > reg@yahoo.com> wrote:<br>> ><br>> > > Greetings group!<br>> > ><br>> > > Anyone who had problems and hopefully with a solution to why<br>> > > Memcache 1.2.2 does not seem to work with a Mongrel Cluster? It<br>> > > works fine when I use it with just one Mongrel instance, but with a<br>> > > cluster, the sessions keep getting lost.<br>> ><br>> > Which
client?<br>><br>><br>><br></drbrain@segment7.net></catandmao-reg@yahoo.com></blockquote><br><p> 
<hr size=1> <a href="http://answers.yahoo.com.sg"><img src="http://sg.yimg.com/i/sg/answers/yanswers_footer.gif" height=65 width=346></a><br>
<font color=#33CC00><strong>Real people. Real questions. Real answers. <a href="http://answers.yahoo.com.sg">Share what you know</a></strong></font>.