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
Making a corresponding issue for the related fix PR: #762
Timeouts that occur during connection initialization can cause the socket to never be closed properly, leading to a resource leak. This can manifest in a lot of dangling CLOSED_WAIT or ESTABLISHED sockets that are kept open by the application.
Steps to repro:
In the client:
# irb or rails cclient=HTTP.timeout(5)client.get("https://www.example.org").body.to_s# or use an unallocated ip like 240.0.0.0client.get("https://www.example.org").body.to_sclient.get("https://www.example.org").body.to_s
Simultaneously:
Set up a mitm to intercept example.org, and add network conditioning to make the request very slow. Or use a custom server and endpoint where you can control the connect delays.
Check the sockets opened by the ruby process:
watch -n 1 "lsof -i -P | grep PROCESS_PID" # replace PROCESS_PID with the rails process pid
You'll notice that sockets will stay in ESTABLISHED or CLOSE_WAIT as you make more and more requests that time out.
Making a corresponding issue for the related fix PR: #762
Timeouts that occur during connection initialization can cause the socket to never be closed properly, leading to a resource leak. This can manifest in a lot of dangling
CLOSED_WAIT
orESTABLISHED
sockets that are kept open by the application.Steps to repro:
In the client:
Simultaneously:
You'll notice that sockets will stay in ESTABLISHED or CLOSE_WAIT as you make more and more requests that time out.
The text was updated successfully, but these errors were encountered: