Rails Memcache issues

Error :-
down_retry_delay not reached for localhost:11211 (0.001 seconds left)
down_retry_delay not reached for localhost:11211 (0.001 seconds left)
down_retry_delay not reached for localhost:11211 (0.001 seconds left)
down_retry_delay not reached for localhost:11211 (0.001 seconds left)
[2012-03-20 15:08:28] ERROR NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
    /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/handler/webrick.rb:71:in `service'
    /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
    /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
    /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
cache: [GET /assets/kanga_custom/search_merchant.js?body=1] miss, store
Dalli::Server#connect localhost:11211
localhost:11211 failed (count: 3)
localhost:11211 is still down (for 2.030 seconds now)

and

root@rao-desktop:~/Aptana Studio 3 Workspace/Kanga# irb
irb(main):001:0> require 'dalli'
=> true
irb(main):002:0> dc = Dalli::Client.new('localhost:11211')
=> #<Dalli::Client:0x9f89338 @servers="localhost:11211", @options={:expires_in=>0}, @ring=nil>
irb(main):003:0> dc.set('abc', 123)
I, [2012-03-20T15:04:48.093716 #2419]  INFO -- : localhost:11211 failed (count: 0)
Dalli::RingError: No server available
    from /usr/local/lib/ruby/gems/1.9.1/gems/dalli-1.1.5/lib/dalli/ring.rb:45:in `server_for_key'
    from /usr/local/lib/ruby/gems/1.9.1/gems/dalli-1.1.5/lib/dalli/client.rb:263:in `perform'
    from /usr/local/lib/ruby/gems/1.9.1/gems/dalli-1.1.5/lib/dalli/client.rb:139:in `set'
    from (irb):3
    from /usr/local/bin/irb:12:in `<main>'
irb(main):004:0>

Solution:-


Try 127.0.0.1 instead of localhost. in delli gem configuration



Comments

  1. Thanq soooo much subba rao.... it was very helpful to me..... continue ur posts like this...

    ReplyDelete

Post a Comment

Popular posts from this blog

scp command usage guide

ROR HEROKU Working with file storage like paperclip in heroku for free of cost ( paperclip and dropbox) paperclip-dropbox config | ROR, HEROKU, file storage, paperclip, in heroku, free of cost, paperclip, dropbox, paperclip-dropbox config