Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

All was well, then I rebooted the server.

Right now:

$ ps aux | grep memcache
1000     27168  0.0  0.0 121972  1056 pts/0    Sl   15:18   0:00 memcached -m 64 -p 11211 -u nobody -l 127.0.0.1
1000     27816  0.0  0.0   7628   956 pts/0    S+   15:36   0:00 grep memcache

meanwhile the rails app's log is getting tons of this:

MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)
MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)
MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)
MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:55 -0600 2011)
MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)
MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)
MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)
MemCacheError (No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)): No connection to server (localhost:11211 DEAD (Timeout::Error: execution expired), will retry at Tue Feb 15 15:35:56 -0600 2011)

Being that I'm more of a developer than a server guy, and being that we don't really have a "server guy," and this being in production... where do I start with this?

share|improve this question
add comment

2 Answers

netstat -tupln | grep -i memcache

This will tell you if your memcache instance is listening and on what port. I'd check in /etc/hosts that localhost is defined. It should be by default but if someone has gone DD happy in Vi you can get real problems. Your PS output shows memcache starting with -l 127.0.0.1 but your script is connecting to 'localhost' - This be by definition is the same thing, but, it's arbitrary in the fact you can delete the localhost line, or re-alias to the IP that's up on eth0.

memcache is a plain-text protcol, so try telnetting to the port

telnet 127.0.0.1 11211

you should get the same response from

telnet localhost 11211
share|improve this answer
    
Those are helpful tips. In my case it ended up being that the loopback device wasn't working for some reason. Weird. After ifdown and then ifup it things were back to normal. –  centipedefarmer Feb 17 '11 at 4:09
add comment

We had this issue and it was resolved once we swapped memcache client

https://github.com/mperham/dalli

(wasn't too much work to change)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.