Closed dgrnbrg closed 11 years ago
Need to see what the Java client does. Do they explicitly close streams in the higher-level client?
I didn't see them closing the streams where I looked, in RiakObject and some Connection class.
It may be because they rely on connection pooling? (just a hypothesis)
Based on my read of the stackoverflow post, riak-java-client is using the connection pooling automatically, and somehow there's a bad interaction/connection pool leak somewhere in the stack.
On Fri, Nov 8, 2013 at 9:48 AM, Michael Klishin notifications@github.comwrote:
It may be because they rely on connection pooling? (just a hypothesis)
— Reply to this email directly or view it on GitHubhttps://github.com/michaelklishin/welle/issues/21#issuecomment-28067524 .
Thanks. FWIW, Welle is basically a thin Clojure layer on top of their "raw client" and it does not open or close connections at any point. Feel free to reopen if you find out more.
I believe that when you call toRiakObject in
clojurewerkz.welle.core
on line 186, you need to close the associated stream. Today in production I encountered this issue in calls toclojurewerkz.welle.kv/store
andclojurewerkz.welle.kv/fetch
. I traced through the riak-java-client and welle code paths, and my current conclusion is that the connection is leaked. What do you think?I should mention that simply calling
connect!
again fixed the issue. I haven't checked to see whether httpclient's connection pools are a static or instance member, however.