Skip to content

Commit

Permalink
Pools connections to memcachier since we’re multithreaded (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbothner authored Sep 5, 2017
1 parent 55b0244 commit 8c72c17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@ gem 'rails', '>= 5.0.0', '< 5.1'
gem 'haml'
gem 'inline_svg'
gem 'jbuilder', '~> 2.0'
gem 'markerb'
gem 'multi_json'
gem 'oj'
gem 'oj_mimic_json'
gem 'multi_json'
gem 'markerb'
gem 'redcarpet'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker', git: 'https://github.com/rails/webpacker'

gem 'jquery-rails'
gem 'bourbon'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'

gem 'connection_pool'
gem 'dalli'
gem 'redis', '~> 3.0'

gem 'lograge'
gem 'awesome_print'
gem 'lograge'
gem 'newrelic_rpm'
gem 'scout_apm'

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ GEM
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
connection_pool (2.2.1)
dalli (2.7.6)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
Expand Down Expand Up @@ -395,6 +396,7 @@ DEPENDENCIES
byebug
capybara
coffee-rails (~> 4.1.0)
connection_pool
dalli
database_cleaner
devise (~> 4.1)
Expand Down
3 changes: 2 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
failover: true,
socket_timeout: 1.5,
socket_failure_delay: 0.2,
down_retry_delay: 60 }
down_retry_delay: 60,
pool_size: ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i }

# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
Expand Down

0 comments on commit 8c72c17

Please sign in to comment.