Heroku request timeout when Memcachier reaches cache limit
Perhaps try updating your production.rb
to include socket_timeout
and socket_failure_delay
options.
require 'dalli'cache = Dalli::Client.new((ENV["MEMCACHIER_SERVERS"] || "").split(","), {:username => ENV["MEMCACHIER_USERNAME"], :password => ENV["MEMCACHIER_PASSWORD"], :failover => true, :socket_timeout => 1.5, :socket_failure_delay => 0.2 })
-- OR --
If you are using Puma, you need to have the connection_pool
gem installed.
Gemfile
gem 'connection_pool'
And this configuration in your production.rb
config.cache_store = :dalli_store, (ENV["MEMCACHIER_SERVERS"] || "").split(","), {:username => ENV["MEMCACHIER_USERNAME"], :password => ENV["MEMCACHIER_PASSWORD"], :failover => true, :socket_timeout => 1.5, :socket_failure_delay => 0.2, :pool_size => 5 }