I have a Rails app deployed to Heroku using Memcachier (Dalli as client). I'm using the free add-on (which offers a 25 MB cache).
We started to receive request timeouts from heroku and, after debugging, we found out that manually flushing Memcachier solved the problem.
Timeouts occur when Memcachier reaches levels near its limit, like 20 MB (when limit is 25 MB).
Why Memcachier doesn't free cache space with time? Is there any missing configuration to tell Memcachier to flush when cache reach certain size?
My conf:
application.rb
config.cache_store = :dalli_store
production.rb
client = Dalli::Client.new
config.action_dispatch.rack_cache = {
:metastore => client,
:entitystore => client,
:allow_reload => false
}
Perhaps try updating your
production.rb
to includesocket_timeout
andsocket_failure_delay
options.-- OR --
If you are using Puma, you need to have the
connection_pool
gem installed.Gemfile
And this configuration in your production.rb