I recently migrated my code from Rails 2.3.4 to rails 3 and started using a passenger with it. I also use memcached gem and I accidentally see Memcached :: ClientError and Memcached :: ServerIsMarkedDead. I read this article which says that passenger smart spawning is having trouble connecting with memcache. So I tried to fix the mention on my site
CACHE = MemCache.new memcache_options
CACHE.servers = '127.0.0.1:11211'
begin
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
CACHE.reset
end
end
rescue NameError => error
end
But still I get the same error. Does it have anything to do with the memcached library.
source
share