diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-09-20 11:56:40 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-09-20 11:56:40 +0000 |
commit | 4276172b6977bb83de2dc86ecccd48984e09955c (patch) | |
tree | 10cab126bf997e9b7342b6a84fc1b4ea4740bfdd | |
parent | ab3efb6664c17f1367772da3bbdc8648535adf63 (diff) | |
parent | 93d0243d531e37e9d117b5900e9af1573b411840 (diff) | |
download | gitlab-ce-4276172b6977bb83de2dc86ecccd48984e09955c.tar.gz |
Merge branch '22364-rails-cache-redis-connection-pool' into 'master'
Use a ConnectionPool for Rails.cache on Sidekiq servers
See merge request !6429
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | config/application.rb | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG index 389e5787e5f..bc19048e94b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -156,6 +156,7 @@ v 8.12.0 (unreleased) - Add notification_settings API calls !5632 (mahcsig) - Remove duplication between project builds and admin builds view !5680 (Katarzyna Kobierska Ula Budziszewska) - Fix URLs with anchors in wiki !6300 (houqp) + - Use a ConnectionPool for Rails.cache on Sidekiq servers - Deleting source project with existing fork link will close all related merge requests !6177 (Katarzyna Kobierska Ula Budziszeska) - Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225 - Fix Gitlab::Popen.popen thread-safety issue diff --git a/config/application.rb b/config/application.rb index 4792f6670a8..8166b6003f6 100644 --- a/config/application.rb +++ b/config/application.rb @@ -116,6 +116,10 @@ module Gitlab redis_config_hash = Gitlab::Redis.params redis_config_hash[:namespace] = Gitlab::Redis::CACHE_NAMESPACE redis_config_hash[:expires_in] = 2.weeks # Cache should not grow forever + if Sidekiq.server? # threaded context + redis_config_hash[:pool_size] = Sidekiq.options[:concurrency] + 5 + redis_config_hash[:pool_timeout] = 1 + end config.cache_store = :redis_store, redis_config_hash config.active_record.raise_in_transactional_callbacks = true |