HTTPS clone URL
Subversion checkout URL
Please sign in to comment.
Wrap all HTTP requests in a 5 second timeout
* Web requests should be typically processed in no more than 500ms, and ideally under 200ms. * Even though an error page will be issued to the client, and the connection terminated, when a timeout occurs the web process is still left to process the request. Subsequent requests may then be routed to the same process which will be unable to respond, causing further degradation. * rack-timeout ensures processes don’t remain tied up after 5 seconds of inactivity. * This also makes it less likely that a user sees a timeout page and the change they were trying to make actually went through (ie, their credit card is charged but they see a generic error page). https://devcenter.heroku.com/articles/request-timeout
- Loading branch information...
Showing with 8 additions and 0 deletions.
|@@ -0,0 +1 @@|
|+Rack::Timeout.timeout = (ENV['TIMEOUT_IN_SECONDS'] || 5).to_i|