hbase-stargate icon indicating copy to clipboard operation
hbase-stargate copied to clipboard

Net::HTTP leaving connections open

Open iconnor opened this issue 13 years ago • 3 comments

If you just use the client and let it go out of scope, it can leave many connections open and in a busy site saturate the server with open connections.

It would be good to have a setting that is more aggressive about closing the http connections when they are done.

iconnor avatar Oct 26 '11 14:10 iconnor

I'm using the Patron HTTP client now ( http://toland.github.com/patron/ ) and it cleans up connections when the Patron sessions get GCed. Let me know if this continues to be a problem.

greglu avatar Nov 12 '11 05:11 greglu

We just updated to the latest version and still have many connections left open. Is just updating the gem enough to get the new HTTP client or is there more that is needed?

iconnor avatar Dec 13 '11 20:12 iconnor

When you say many connections are left open, do you mean connections between the REST server and zookeeper? Or really the HTTP connections from your Ruby client to the REST server? In the former case, there is a known bug that causes zookeeper connection leaks in the REST server (https://issues.apache.org/jira/browse/HBASE-4684), that has since been resolved for release 0.90.5.

I'm seeing these connection leaks as well, and applying the patch fixes the problem. I haven't noticed any issues between the Ruby client and the REST server, however.

greglu avatar Dec 27 '11 18:12 greglu