Comments (10)
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.
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.
I suspect you're on OSX. OSX treats localhost as an IPv6 address. You told memcached to bind to an IPv4 address.
from dalli.
No, it's debian squeeze, but I get what you mean.
Thanks
from dalli.
What version of memcached ("memcached -h | head -1")? That stack looks like you are running 1.2.x.
from dalli.
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.
Ubuntu Jaunty comes with memcached 1.2.x, which is not supported. You can stop posting the same comment now. :-)
from dalli.
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.
Dalli only supports non-crashing versions of memcached. :-)
from dalli.
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)
- All servers are eagerly flushed at the end of a multi block
- Pipelining support HOT 6
- Performance loss when upgrading from Dalli 2.7.10 to 3.2.2 HOT 5
- Question: Session cookies with Dalli HOT 1
- Meta protocol flush_all method is vulnerable to code injection (Lack of input type check) HOT 7
- Behavior around clear
- Hanging when performing read_multi against large number of keys HOT 4
- DalliError: Response error 6: Incr/decr on a non-numeric value HOT 2
- Dalli sometimes returns incorrect values HOT 18
- Loss of Connections after upgrading to dalli 3.2.3 HOT 3
- `cache_nils` vs `skip_nil` HOT 3
- No request in progress HOT 2
- IO::TimeoutError exceptions are not handled, breaking automatic retry HOT 4
- connection_pool gem is required HOT 11
- Ruby 3.3: warning related to base64 missing in the gemspec
- TypeError: no implicit conversion of Hash into String HOT 27
- Add TruffleRuby to CI? HOT 2
- 3.2.7 tagged logging issue HOT 1
- TypeError raised in latest Socksify when initializing Dalli client with version 3.2.7+ HOT 4
- Should I react to the "Fork detected, re-connecting child process" exception? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dalli.