Skip to content
Snippets Groups Projects
Unverified Commit d587a268 authored by Claire's avatar Claire Committed by GitHub
Browse files

Add logging for Rails cache timeouts (#21667)

* Reduce redis cache store connect timeout from default 20 seconds to 5 seconds

* Log cache store errors
parent 14e2354e
No related branches found
No related tags found
No related merge requests found
# Log cache errors with Rail's logger
# This used to be the default in old Rails versions: https://github.com/rails/rails/commit/7fcf8590e788cef8b64cc266f75931c418902ca9#diff-f0748f0be8a653eea13369ebb1cadabcad71ede7cfaf20282447e64329817befL86
Rails.cache.logger = Rails.logger
......@@ -37,6 +37,7 @@ REDIS_CACHE_PARAMS = {
namespace: cache_namespace,
pool_size: Sidekiq.server? ? Sidekiq.options[:concurrency] : Integer(ENV['MAX_THREADS'] || 5),
pool_timeout: 5,
connect_timeout: 5,
}.freeze
REDIS_SIDEKIQ_PARAMS = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment