Ruby on Rails Caching: memcached Connection Lost Problem - FiveRuns' Memcache-client to Rescue
You use memcached server and memcached-client for caching with your Ruby on Rails application. One day, monit tells you that memcached got restarted. Sounds good. But when you check your Ruby on Rails app, it gives you 500 errrors all over the place. You check your server logs. Tons of errors on 'lost connection' with memcache. It turned out that memcached-client doesn't automatically retry on failed memcached connection.
Fortunately, FiveRuns fixed memcached-client and released it
To install:
sudo gem install fiveruns-memcache-client --source http://gems.github.com
edit appropriate Ruby on Rails environment where you need to turn on caching:
#gem 'memcache-client' #once memcache-client loses connection to memcached, it won't retry. #use fiverun's memcache-client because it can deal with retry after losing connection to memcached #http://github.com/fiveruns/memcache-client/tree/master gem 'fiveruns-memcache-client'











