Giter VIP home page Giter VIP logo

Comments (10)

morgoth avatar morgoth commented on July 22, 2024

memcache deamon is running like this:
$ ps ax | grep memcache
1036 ? Sl 0:00 /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1

from dalli.

morgoth avatar morgoth commented on July 22, 2024

Ok, now is working - after configuring it like this:
config.cache_store = :dalli_store, "127.0.0.1:11211"

Shouldn't it be handled automatically?
Or what is the proper way of launching memcached, to have it working without specyfing this server configuration?

from dalli.

mperham avatar mperham commented on July 22, 2024

I suspect you're on OSX. OSX treats localhost as an IPv6 address. You told memcached to bind to an IPv4 address.

from dalli.

morgoth avatar morgoth commented on July 22, 2024

No, it's debian squeeze, but I get what you mean.
Thanks

from dalli.

mperham avatar mperham commented on July 22, 2024

What version of memcached ("memcached -h | head -1")? That stack looks like you are running 1.2.x.

from dalli.

hipertracker avatar hipertracker commented on July 22, 2024

dalli (1.0.1) is broken under Ubuntu and memcached 1.2.2...

UBUNTU (Linux Ubuntu-904-jaunty-64-minimal 2.6.28-19-server #66-Ubuntu SMP Sat Oct 16 18:11:06 UTC 2010 x86_64 GNU/Linux)

$ ps aux | grep memcached
nobody   18406  0.0  0.0  21460  1512 pts/0    S    04:02   0:00 /usr/bin/memcached -m 256 -p 11211 -u nobody -l 127.0.0.1

$ memcached -h | head -1
1.2.2

$ irb
ruby-1.9.2-p136 :001 > require 'dalli'
=> true 
ruby-1.9.2-p136 :002 > dc = Dalli::Client.new('127.0.0.1:11211')
=> #0} 
ruby-1.9.2-p136 :003 > dc.flush
I, [2011-02-03T04:32:34.600329 #20576]  INFO -- : 127.0.0.1:11211 failed (count: 0)
I, [2011-02-03T04:32:35.111388 #20576]  INFO -- : 127.0.0.1:11211 failed (count: 1)
W, [2011-02-03T04:32:35.111604 #20576]  WARN -- : 127.0.0.1:11211 is down
Dalli::NetworkError: 127.0.0.1:11211 is down: Timeout::Error IO timeout

But it works OK on OSX and memcached 1.2.8...

Mac OS-X (10.6.6):

$ ps aux | grep memcached
zbiru    53171   0.0  0.0  2457828    920   ??  S    Wed01am   0:03.52 /usr/local/bin/memcached -l 127.0.0.1
zbiru    22903   0.0  0.0  2435116    528 s000  S+    3:32am   0:00.00 grep memcached

$ memcached -h | head -1
memcached 1.2.8

$ irb
ruby-1.9.2-p136 :007 > require 'dalli'
 => false 
ruby-1.9.2-p136 :008 > dc = Dalli::Client.new('127.0.0.1:11211')
 => #0} 
ruby-1.9.2-p136 :009 > dc.flush
 => [true]

from dalli.

mperham avatar mperham commented on July 22, 2024

Ubuntu Jaunty comes with memcached 1.2.x, which is not supported. You can stop posting the same comment now. :-)

from dalli.

hipertracker avatar hipertracker commented on July 22, 2024

I have just installed the latest stable memcached 1.4.5 on Ubuntu. Something is fucked up. memcached quits with segmentation fault (sic!) after the following command: ruby -rdalli -e "Dalli::Client.new('127.0.0.1:11211').flush"

from dalli.

mperham avatar mperham commented on July 22, 2024

Dalli only supports non-crashing versions of memcached. :-)

from dalli.

MaffooClock avatar MaffooClock commented on July 22, 2024

I know this issue has been closed, but I thought I'd add a comment in case someone else runs into this. My production server is running Ubuntu Lucid Lynx (10.04 LTS) with ruby 1.9.2p180, Rails 3.1, Passenger 3.0.7, memcached 1.4.2 (confirmed with memcached -h | head -1) and dalli 1.1.2. The localhost name resolved to IPv4. However, I kept seeing "localhost:11211 failed", along with "localhost:11211 is down".

I took morgoth's comment and specified "127.0.0.1:11211" and the problem went away.

from dalli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.