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

objstore: Increase the response header timeout in the S3 provider to 2 minutes and make it configurable #1094

Merged
merged 10 commits into from May 16, 2019

Conversation

antonio
Copy link
Contributor

@antonio antonio commented Apr 29, 2019

Changes

This PR increases the response header timeout in the S3 provider from 15 seconds (introduced in #323) to 2 minutes, an arbitrary number that I've found works well with large blocks as a result of debugging #318. This has solved my recurring problems with the net/http: timeout awaiting response headers error.

I'm not sure whether a fixed number like this or having a configuration flag is better: while the latter is more flexible I believe it introduces complexity and does not provide much value. I'm happy to update this if that's the preferred solution, though.

Verification

I have been running three different compactor processes against a few buckets that would always fail to be compacted with the aforementioned error, and haven't seen a single error in 4 days.

Copy link
Member

@povilasv povilasv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Good stuff 🥇

Some minor things:

  • Please add an item to changelog.

Also maybe make this configurable, but with 2 minute default?

And if if you can please add docs 🙇‍♂️ . What kind of errors did you get and how did you figure you need to bump this? I think this could save time for everyone in the future 👍

@bwplotka bwplotka changed the title .*: Increase the response header timeout in the S3 provider to 2 minutes objstore: Increase the response header timeout in the S3 provider to 2 minutes May 2, 2019
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @povilasv

If you make it an option to S3 config you don't need to touch the code if you wish to adjust it someday 👍

@midnightconman
Copy link
Contributor

This seems very similar to #567, can you explain the difference between the two options?

@antonio
Copy link
Contributor Author

antonio commented May 6, 2019

@povilasv @bwplotka thank you for your feedback, I'll make the rest of the HTTP options configurable in the same way that it's done in the PR that @midnightconman linked to.

@antonio antonio force-pushed the increase-response-header-timeout branch from 5db0bce to cfab9d9 Compare May 14, 2019 09:49
@antonio antonio changed the title objstore: Increase the response header timeout in the S3 provider to 2 minutes objstore: Increase the response header timeout in the S3 provider to 2 minutes and make it configurable May 14, 2019
@antonio
Copy link
Contributor Author

antonio commented May 14, 2019

@povilasv @bwplotka I think this is ready for another 👀

I've decided to only make that one option configurable in the end as opposed to make every HTTPTransport timeout configurable to not add extra complexity, but could do the latter if you feel different.

I've refactored the tests to make it a little bit more clear what the default values are for the HTTP client, and reworded some parts of the documentation while I dropped a line about this new option.

Copy link
Member

@povilasv povilasv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work 🥇

Please resolve changelog conflicts.

@bwplotka PTAL :)

Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into the same problem ourselves - need to be able to customize this value since sometimes the S3 API just doesn't respond with the headers that fast.

@GiedriusS GiedriusS merged commit aedcb2e into thanos-io:master May 16, 2019
@GiedriusS
Copy link
Member

🎉 thank you ❤️

@antonio antonio deleted the increase-response-header-timeout branch May 16, 2019 14:34
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.

None yet

5 participants