Open rkhapre opened 4 years ago
Please, check out https://github.com/httprb/http/wiki/Timeouts We have a bit too strict default values #579 right now, which we will bump up in next major release
@ixti . Thanks for your reply. I have checked this earlier as well. I was using global timeout of 50. Then also had similar issue.
Now i used this
HTTP.timeout(connect: 50, write: 2, read: 50).
Even though i keeping read as 50, i have similar issue. Out of 10 times, 8 times i get this response
I switched to latest version 4.4.1, then also same. If i use HTTP.persistent then the code runs forever
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/null.rb:63:in `rescue in rescue_readable': Read timed out after 50 seconds (HTTP::TimeoutError)
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/null.rb:59:in `rescue_readable'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/per_operation.rb:30:in `connect_ssl'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/null.rb:36:in `start_tls'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/connection.rb:158:in `start_tls'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/connection.rb:46:in `initialize'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/client.rb:71:in `new'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/client.rb:71:in `perform'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/client.rb:31:in `request'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/chainable.rb:20:in `get'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/per_operation.rb:32:in `connect_nonblock': read would block (OpenSSL::SSL::SSLErrorWaitReadable)
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/per_operation.rb:32:in `block (2 levels) in connect_ssl'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/null.rb:68:in `rescue_writable'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/per_operation.rb:31:in `block in connect_ssl'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/null.rb:60:in `rescue_readable'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/per_operation.rb:30:in `connect_ssl'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/timeout/null.rb:36:in `start_tls'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/connection.rb:158:in `start_tls'
``` from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/connection.rb:46:in `initialize'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/client.rb:71:in `new'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/client.rb:71:in `perform'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/client.rb:31:in `request'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/http-4.4.1/lib/http/chainable.rb:20:in `get'
Hi All
I am using the httprb, its working well with https many URL. But one of the URL uses the SSL certificate, so i have used Verify as None like below
Out of 10 request, 8 times i get below response/Error but for other 2 request when i get i get the perfect response
` To me looks like this issue with combination of httprb and Open SSL. Where i can set the SSL Wait Read timeout ? I do not see any option
I checked many users have used this option "OpenSSL::SSL::VERIFY_NONE", so they also might be experiencing same issue. So we have any solution for this?
Thanks.