-
Notifications
You must be signed in to change notification settings - Fork 468
Docs missing for setting recommended timeouts #493
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
Comments
Makes sense to me. Pull requests and +1s on the issue summary will help it move up the backlog. |
@childish-sambino thanks. I I couldn't figure out from a quick code read and poking at it how to configure the twilio http client globally |
data point for whoever does this: https://github.com/ankane/the-ultimate-guide-to-ruby-timeouts/blob/master/test/twilio_test.rb |
seems related to https://github.com/twilio/twilio-ruby/pull/514/files #513 where the answer can be something like client = Twilio::REST::Client.new(ENV["TWILIO_ACCOUNT_SID"], ENV["TWILIO_AUTH_TOKEN"]).tap do |c|
if c.http_client.timeout.nil?
c.http_client.instance_variable_set(:@timeout, 20)
raise ArgumentError, "Expected to set timeout to 20" if c.http_client.timeout != 20
end
end bearing in mind that twilio doesn't distinguish the two timeout types and doesn't provide a writer for either f.options.open_timeout = request.timeout || @timeout
f.options.timeout = request.timeout || @timeout |
Hijacking my own issue since related
So, I shouldn't assume I want to retry the request, no? How long long to wait before I could reliably check the messages API for the absence of the sent text to mean it wasn't sent. Query by message id immediately after creating a message is basically immediately available, but query by number and date-sent are more likely to be 'eventually consistent', per CAP theorem I have an open support ticket about this ( 4562575 ) but it's going back and forth so I thought I'd share the situation here in case it helps anyone (including myself) |
What I ended up writing in my support ticket before closing it
My support rep responded to this with
so, |
related? #559 |
Issue Summary
We just got an 'execution expired' net open timeout from twilio (
Twilio::REST::TwilioError
) , which is fine, it happens, but because we're on Heroku, we need to limit requests to less than 30 seconds else they close it. I saw an error in the log and the customer said the request took a very long time (we validate phone numbers on some object creation using the lookup api).Which got me to thinking:
related to Add a global configuration for the HTTP client #467 Unhandled Faraday::Connection Failed #455
Steps to Reproduce
run an app for while and once in a blue moon get a server time out.
Code Snippet
globally maybe do
twilio specific would have something to do with the http client
Exception/Log
see related issues
Technical details:
The text was updated successfully, but these errors were encountered: