Broken pipe error in rails with memcached

Posted by abronte on Stack Overflow See other posts from Stack Overflow or by abronte
Published on 2010-03-27T12:46:43Z Indexed on 2010/03/27 12:53 UTC
Read the original article Hit count: 351

I keep running into this error MemCacheError (Broken pipe): Broken pipe on my Rails app and I can't figure out why.

When I access memcached via Rails.cache in my controller, the first 1 or 2 read/writes always seems to throw the broken pipe error. But when I access memcached by creating a new object, ActiveSupport::Cache::MemCacheStore.new, I don't seem to get this error.

I also access memcached in another ruby process, and the first read always has this error regardless of the way I access memcached. I did implement a work around just by retrying the read but id rather have a better long term solution.

Currently the only time I see this problem is after I restart memcached. I'm using Rails 2.3.5 and memcached 1.4.4 (I've also tried this with memcached 1.2.2).

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about memcached