Rails/Memcached - MemCacheError (end of file reached): end of file reached

Go To StackoverFlow.com


My Rails app is using a Memcached server.

from some reason, from time to time, I'm getting MemCacheError (end of file reached): end of file reached in my Rails application logs.

any ideas why?

2012-04-04 19:38
by Ran
Did you try restarting the server? sudo /etc/init.d/memcached restart ? - MT. 2012-04-18 20:11


Since you're using memcache-client, and that code has been deprecated since 2010, it might simply be a bug that hasn't ever been fixed. The guy behind memcache-client ended up coming up with dalli (https://github.com/mperham/dalli), which has much better support.

Going into the source for memcache-client reveals a couple of things. The only places that could raise a MemCacheError with those error messages are Cache#get, Cache#put, Cache#add, or Cache#delete. You can find those at (https://github.com/mperham/memcache-client/blob/master/lib/memcache_util.rb) on lines 42, 61, 76, and 91 respectively. Without knowing more about what you're trying to do, I can't help more than that, but hopefully that will get you started.

2013-11-12 17:58
by kddeisz