Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually respect the server timeout option. #116

Merged
merged 1 commit into from
Mar 12, 2013
Merged

Actually respect the server timeout option. #116

merged 1 commit into from
Mar 12, 2013

Conversation

eventualbuddha
Copy link
Contributor

The problem with the way it was structured before is that Net::HTTP instances have their own read timeout of 60s. If you configured server timeout to be longer than that then the inner timeout will fire first and be caught by the rescue handler for Timeout::Error, which assumes that the configured server timeout has elapsed.

I ran into this with an app that, for some reason, is taking longer than 60s to respond (slow CI machine?). I had configured both timeout and server timeout to be 600,000s and have a global timeout on the CI server that will just kill anything that takes too long.

The problem with the way it was structured before is that Net::HTTP instances have their own read timeout of 60s. If you configured server timeout to be longer than that then the inner timeout will fire first and be caught by the rescue handler for Timeout::Error, which assumes that the configured server timeout has elapsed.

I ran into this with an app that, for some reason, is taking longer than 60s to respond (slow CI machine?). I had configured both timeout and server timeout to be 600,000s and have a global timeout on the CI server that will just kill anything that takes too long.
@netzpirat netzpirat merged commit b4610cb into guard:master Mar 12, 2013
@netzpirat
Copy link
Contributor

Oh wow, I was not aware of that behavior. Thanks a lot for this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants