Wrap all HTTP requests in a 5 second timeout #144

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

croaky commented Jan 24, 2013

  • 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.

https://devcenter.heroku.com/articles/request-timeout

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.

https://devcenter.heroku.com/articles/request-timeout
Owner

jferris commented Jan 24, 2013

Another benefit: this 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).

Looks good to me.

@croaky croaky closed this Jan 25, 2013

Contributor

croaky commented Jan 25, 2013

Thanks, Joe. I added your comment to the commit message, which changed the hash to 3f444c8, and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment