Skip to content

Instantly share code, notes, and snippets.

@np422
Created February 3, 2012 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save np422/1728906 to your computer and use it in GitHub Desktop.
Save np422/1728906 to your computer and use it in GitHub Desktop.
ruby-1.9.2-p0 > require "dalli"
=> true
ruby-1.9.2-p0 > require "memcache"
=> true
ruby-1.9.2-p0 > m = MemCache.new(['192.168.31.206:11212:10', '192.168.31.207:11212:10'] )
=> <MemCache: 2 servers, ns: nil, ro: false>
ruby-1.9.2-p0 > m.get "apa"
=> "bepa"
ruby-1.9.2-p0 > m.set "foo" , "bar"
=> "STORED\r\n"
ruby-1.9.2-p0 > d = Dalli::Client.new([ '192.168.31.206:11212:10', '192.168.31.207:11212:10'])
=> #<Dalli::Client:0x00000004abcd78 @servers=["192.168.31.206:11212:10", "192.168.31.207:11212:10"], @options={:expires_in=>0}, @ring=nil>
ruby-1.9.2-p0 > d.get "apa"
I, [2012-02-03T10:21:57.790164 #28070] INFO -- : 192.168.31.206:11212 failed (count: 0)
I, [2012-02-03T10:21:58.304114 #28070] INFO -- : 192.168.31.207:11212 failed (count: 0)
I, [2012-02-03T10:21:58.818027 #28070] INFO -- : 192.168.31.207:11212 failed (count: 1)
W, [2012-02-03T10:21:58.818127 #28070] WARN -- : 192.168.31.207:11212 is down
I, [2012-02-03T10:21:59.318864 #28070] INFO -- : 192.168.31.206:11212 failed (count: 1)
W, [2012-02-03T10:21:59.318933 #28070] WARN -- : 192.168.31.206:11212 is down
Dalli::RingError: No server available
from /usr/local/rvm/gems/ruby-1.9.2-p0@img/gems/dalli-1.1.4/lib/dalli/ring.rb:45:in `server_for_key'
from /usr/local/rvm/gems/ruby-1.9.2-p0@img/gems/dalli-1.1.4/lib/dalli/client.rb:263:in `perform'
from /usr/local/rvm/gems/ruby-1.9.2-p0@img/gems/dalli-1.1.4/lib/dalli/client.rb:68:in `get'
from (irb):7
from /usr/local/rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `<main>'
ruby-1.9.2-p0 > Dalli::Client.compatibility_mode
=> false
ruby-1.9.2-p0 > Dalli::Client.compatibility_mode=true
=> true
ruby-1.9.2-p0 > d = Dalli::Client.new([ '192.168.31.206:11212:10', '192.168.31.207:11212:10'])
=> #<Dalli::Client:0x00000004a79b40 @servers=["192.168.31.206:11212:10", "192.168.31.207:11212:10"], @options={:expires_in=>0}, @ring=nil>
ruby-1.9.2-p0 > d.get "apa"
I, [2012-02-03T10:22:31.994804 #28070] INFO -- : 192.168.31.206:11212 failed (count: 0)
I, [2012-02-03T10:22:32.506692 #28070] INFO -- : 192.168.31.207:11212 failed (count: 0)
I, [2012-02-03T10:22:33.018629 #28070] INFO -- : 192.168.31.207:11212 failed (count: 1)
W, [2012-02-03T10:22:33.018715 #28070] WARN -- : 192.168.31.207:11212 is down
I, [2012-02-03T10:22:33.519503 #28070] INFO -- : 192.168.31.206:11212 failed (count: 1)
W, [2012-02-03T10:22:33.519575 #28070] WARN -- : 192.168.31.206:11212 is down
Dalli::RingError: No server available
from /usr/local/rvm/gems/ruby-1.9.2-p0@img/gems/dalli-1.1.4/lib/dalli/ring.rb:45:in `server_for_key'
from /usr/local/rvm/gems/ruby-1.9.2-p0@img/gems/dalli-1.1.4/lib/dalli/client.rb:263:in `perform'
from /usr/local/rvm/gems/ruby-1.9.2-p0@img/gems/dalli-1.1.4/lib/dalli/client.rb:68:in `get'
from /usr/local/rvm/gems/ruby-1.9.2-p0@img/gems/dalli-1.1.4/lib/dalli/compatibility.rb:39:in `get'
from (irb):11
from /usr/local/rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `<main>'
ruby-1.9.2-p0 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment