You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing this issue on a Windows machine. Original issue filed with Windows Ruby installer: oneclick/rubyinstaller2#264
It seems that the change from TcpSocket to Socket (#10) released in Ruby 3.1 is now causing timeout latency for me when accessing IPv6 sites using Net::HTTP. Socket.tcp waits 60 sec attempting connect to IPv6, times out, then immediately connects to IPv4. TCPSocket.open does not have this issue.
TCPSocket.open("google.com",80,nil,nil)# fastSocket.tcp("google.com",80,nil,nil,connect_timeout: 60)# times out after 60 sec on IPv6, then falls back to IPv4
TCPSocket.open is fast on both Ruby 3.0 and 3.1, while Socket.tcp is slow on both Ruby 3.0 and 3.1. However, since Net::HTTP switched to Socket in 3.1 it has the end-result of making Net::HTTP slow overall.
The issue may be Windows-specific, since I do not see when using Linux via WSL Ubuntu on the same Windows machine. There's a lot more details in the rubyinstaller2 issue, however, I'm wondering if someone can provide some insight on how to debug this further.
I am experiencing this issue on a Windows machine. Original issue filed with Windows Ruby installer: oneclick/rubyinstaller2#264
It seems that the change from
TcpSocket
toSocket
(#10) released in Ruby 3.1 is now causing timeout latency for me when accessing IPv6 sites using Net::HTTP.Socket.tcp
waits 60 sec attempting connect to IPv6, times out, then immediately connects to IPv4.TCPSocket.open
does not have this issue.TCPSocket.open
is fast on both Ruby 3.0 and 3.1, whileSocket.tcp
is slow on both Ruby 3.0 and 3.1. However, since Net::HTTP switched to Socket in 3.1 it has the end-result of making Net::HTTP slow overall.The issue may be Windows-specific, since I do not see when using Linux via WSL Ubuntu on the same Windows machine. There's a lot more details in the rubyinstaller2 issue, however, I'm wondering if someone can provide some insight on how to debug this further.
Script to reproduce issue:
The text was updated successfully, but these errors were encountered: