Miles, can you connect locally using 127.0.0.1 rather than localhost, that's 
one of the obvious differences between the two and unlikely as it is it has 
caused a couple of issues for me before when the system hasn't been able to 
resolve localhost.

Steve

On 21 Jan 2011, at 00:08, Miles Smith wrote:

> So, I'm trying to develop my site on my mac (Snow Leopard), and I'm having 
> trouble with the Dalli gem: See the output below:
> 
> < 4:00PM>  ~/code/mcserverlist-heroku :git => master, :ruby => 
> |➜   irb
>>> require 'dalli'
> => true
>>> dc = Dalli::Client.new
> => #<Dalli::Client:0x1011ca960 @servers="localhost:11211", 
> @options={:expires_in=>0}>
>>> dc.flush
> I, [2011-01-20T16:01:13.955093 #7663]  INFO -- : localhost:11211 failed 
> (count: 0)
> I, [2011-01-20T16:01:14.465918 #7663]  INFO -- : localhost:11211 failed 
> (count: 1)
> W, [2011-01-20T16:01:14.466363 #7663]  WARN -- : localhost:11211 is down
> Dalli::NetworkError: localhost:11211 is down: Timeout::Error IO timeout
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/server.rb:41:in 
> `request'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/options.rb:14:in 
> `request'
>       from 
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in
>  `synchronize'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/options.rb:13:in 
> `request'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/client.rb:144:in 
> `flush'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/client.rb:144:in 
> `map'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/client.rb:144:in 
> `flush'
>       from (irb):3
>>> dc.set('test', 1)
> I, [2011-01-20T16:01:22.442959 #7663]  INFO -- : localhost:11211 failed 
> (count: 2)
> Dalli::RingError: No server available
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/ring.rb:45:in 
> `server_for_key'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/client.rb:224:in 
> `perform'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/client.rb:111:in 
> `set'
>       from (irb):4
>>> dc.get('test')
> I, [2011-01-20T16:01:27.298276 #7663]  INFO -- : localhost:11211 failed 
> (count: 3)
> Dalli::RingError: No server available
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/ring.rb:45:in 
> `server_for_key'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/client.rb:224:in 
> `perform'
>       from /Library/Ruby/Gems/1.8/gems/dalli-1.0.1/lib/dalli/client.rb:46:in 
> `get'
>       from (irb):5
>>> require 'memcached'
> => true
>>> m = Memcached.new
> => #<Memcached:0x10051a238 @servers=["127.0.0.1:11211:8"], 
> @not_found=#<Memcached::NotFound: Memcached::NotFound>, 
> @struct=#<Rlibmemcached::MemcachedSt:0x10051a1c0>, @default_ttl=604800, 
> @options={:rcv_timeout=>0.25, :binary_protocol=>false, 
> :exceptions_to_retry=>[Memcached::ServerIsMarkedDead, 
> Memcached::ATimeoutOccurred, Memcached::ConnectionBindFailure, 
> Memcached::ConnectionFailure, Memcached::ConnectionSocketCreateFailure, 
> Memcached::Failure, Memcached::MemoryAllocationFailure, 
> Memcached::ReadFailure, Memcached::ServerError, Memcached::SystemError, 
> Memcached::UnknownReadFailure, Memcached::WriteFailure], :noreply=>false, 
> :timeout=>0.25, :prefix_delimiter=>"", :hash_with_prefix_key=>true, 
> :no_block=>false, :server_failure_limit=>2, :credentials=>nil, 
> :distribution=>:consistent_ketama, :ketama_weighted=>true, 
> :default_ttl=>604800, :auto_eject_hosts=>true, :support_cas=>false, 
> :poll_timeout=>0.25, :default_weight=>8, :buffer_requests=>false, 
> :hash=>:fnv1_32, :connect_timeout=>4, :verify_key=>true, 
> :experimental_features=>false, :tcp_nodelay=>false, :retry_timeout=>30, 
> :use_udp=>false, :exception_retry_limit=>5, :cache_lookups=>true, 
> :show_backtraces=>false, :sort_hosts=>false}, 
> @not_stored=#<Memcached::NotStored: Memcached::NotStored>>
>>> m.flush
> => nil
>>> m.set('test', 1)
> => nil
>>> m.get('test')
> => 1
>>> 
> 
> 
> As you can see, the Memcached gem works perfectly, however Dalli does not. 
> Since Dalli is the prefered method for heroku, can anyone help me out with 
> what's going wrong here?
> 
> Miles Smith
> [email protected]
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/heroku?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to