Skip to content

Commit

Permalink
Install rack-timeout in production to curtail stuck requests
Browse files Browse the repository at this point in the history
  • Loading branch information
tjgrathwell committed Aug 31, 2015
1 parent 3728eb3 commit f58d626
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ group :production do
gem 'heroku_rails_deflate'
gem 'newrelic_rpm'
gem 'sentry-raven'
gem 'rack-timeout'
end

gem 'handlebars_assets'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ GEM
rack (~> 1.0)
rack-test (0.6.3)
rack (>= 1.0)
rack-timeout (0.2.4)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
Expand Down Expand Up @@ -402,6 +403,7 @@ DEPENDENCIES
puma
quiet_assets
rack-canonical-host
rack-timeout
rails (= 4.2.4)
rails-assets-sinonjs!
rails_12factor
Expand Down
3 changes: 3 additions & 0 deletions config/initializers/timeout.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if Rails.env.production?
Rack::Timeout.timeout = 25 # seconds
end

0 comments on commit f58d626

Please sign in to comment.