Hello fellow Rubyists,
I am facing a weird problem that I am not sure is suitable for StackOverflow, so posting here hoping someone has a hint on what’s going on.
Recently I am facing an issue where HTTP requests to a particular URL, using any of Ruby’s HTTP clients, just takes a very long time (> 90 seconds) to complete, and seems to be stuck at best, or raise an SSL related error at worst.
Some points:
- This used to work without a problem
- The operating system is Ubuntu 18, Ruby version 3.0.1
- The same URL works without any problem using
curl
in the command line, or using a browser. - All other URLs I have tried are working without any issue
- I was able to reproduce the problem on another system (also Ubuntu, on Github Actions)
- I have tested the site’s SSL certificate in sslshopper.com (report) and it looks ok
- I have refreshed the ubuntu root certificates, thinking it may be the problem
- This has happened to me in the past, and the problem eventually went away
The simple test code is this:
require 'http'
puts "attempting to download"
url = "https://trade.unionbank.co.il/"
p HTTP.get(url).body.to_s
Any pointer to what can be the cause would be appreciated.