I have to create http connections within a rails app to pull some data from a remote server. I am using Net:HTTP, but the http connections created are not persistent. So I end up having lots of sockets in TIME_WAIT state, as these http connections are closed. Anyone knows a good pooling gem which will keep the connections persistent and reuse them?
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
initializers
for that so you will have one connection per server process.