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

Timeout configuration #172

Closed
thesmart opened this issue Aug 30, 2017 · 6 comments
Closed

Timeout configuration #172

thesmart opened this issue Aug 30, 2017 · 6 comments
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@thesmart
Copy link

Issue Summary

Please add configuration options for connection open and read timeouts. The Net::HTTP default of 60 seconds is far too long for a server configuration.

Technical details:

  • sendgrid-ruby Version: master
  • Ruby Version: 2.3.1
@thinkingserious
Copy link
Contributor

Great idea @thesmart, thanks!

I have opened an issue here to implement.

For this issue to gain priority in our backlog, we need additional +1's or a PR. When we receive a PR, that provides the biggest jump in priority.

With Best Regards,

Elmer

@thinkingserious thinkingserious added status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap labels Aug 30, 2017
@thinkingserious thinkingserious added difficulty: medium fix is medium in difficulty hacktoberfest labels Sep 30, 2017
@mbernier
Copy link

@thesmart it looks like sendgrid/ruby-http-client#20 will solve this issue!

@jrectenwald - Would you be up for adding documentation to this repo to explain how to change the http_options in an API call?

@xxswingxx
Copy link

Was this gem updated to support http_options? Looks like only the ruby_http_client was updated.

@NeoPhi
Copy link

NeoPhi commented Jun 13, 2019

Looks like the upstream ruby_http_client hasn't released a new version to pull in.
In the meantime, if you don't mind monkey patching, this worked for us:

module SendGrid
  class Client
    def make_request(http, request)
      http.open_timeout = 10
      http.read_timeout = 10
      response = http.request(request)
      Response.new(response)
    end
  end
end

@thinkingserious
Copy link
Contributor

Hello @xxswingxx,

The next release will include the updated ruby_http_client. I don't have a specific time frame, but there is a release planned.

@NeoPhi,

Thanks for providing the work around!

With Best Regards,

Elmer

@gareth
Copy link

gareth commented Feb 21, 2020

I think this is closed by #405 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

7 participants