hbase-stargate
hbase-stargate copied to clipboard
Net::HTTP leaving connections open
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.
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.
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?
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.