Commit 371e7c34 by jimabramson

tweak request timeout settings for heroku

* use Rack::Timeout, set to 20s
* set unicorn timeout to 25s

Ideally these are set lower, around 10s/15s, however we need to reduce long-running requests (such as notifier batch pulls) before we can safely do this.
parent cf3b1785
......@@ -54,3 +54,4 @@ end
gem 'newrelic_rpm'
gem 'newrelic_moped'
gem 'unicorn'
gem "rack-timeout"
......@@ -117,6 +117,7 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
rack-timeout (0.0.4)
raindrops (0.10.0)
rake (0.9.2.2)
rdiscount (1.6.8)
......@@ -190,6 +191,7 @@ DEPENDENCIES
pry
pry-nav
rack-test
rack-timeout
rake
rdiscount
rest-client
......
require "rack-timeout"
use Rack::Timeout # Call as early as possible so rack-timeout runs before other middleware.
Rack::Timeout.timeout = 20
require './app'
run Sinatra::Application
worker_processes 4
timeout 30
timeout 25
preload_app true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment