My Rails app is intermittently failing to connect to Salesforce (login.salesforce.com) from Fly. The errors are:
Faraday::ConnectionFailed (Failed to open TCP connection to login.salesforce.com:443 (execution expired))
Net::OpenTimeout
What I’ve tested:
From Fly machines in DFW and ORD:
curl -4 https://login.salesforce.com/services/oauth2/token → works reliably.
curl -6 https://login.salesforce.com/services/oauth2/token → hangs or times out every time.
From my laptop outside Fly, both IPv4 and IPv6 succeed.
In Rails, Net::HTTP tries IPv6 first, so the failed IPv6 route results in TCP timeouts.
The app seemed to be working fine yesterday, but today both staging and production are unreliable
This is impacting both staging and production — sometimes it works, sometimes it fails
Is there a known IPv6 routing issue between Fly and Salesforce? And is there a recommended way to force IPv4 connections from Fly machines until this is resolved?
So IPv6 should not work with this domain, period, and nothing should even attempt to use IPv6 with it since there’s no address to connect to. You don’t need to force IPv4 connections because there is no IPv6 to speak of.