Re: Java HTTP Client running out of FD's

2011-02-25 Thread Russell Brown
On Fri, 2011-02-25 at 09:58 +0530, Abhishek Kona wrote: > Also I am not clear about the RiakClient's thread safety. If I share > the RiakClient should the client code maintain locks on it. > Well technically no, it is not strictly thread safe (it retains a reference to the mutable RiakConfig it

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Abhishek Kona
Hi Russell, On 25/02/11 9:36 AM, Abhishek Kona wrote: On 25/02/11 2:07 AM, Russell Brown wrote: On 24 Feb 2011, at 17:20, Abhishek Kona wrote: Each thread has a RiakClient. RiakClient uses Apache HttpClient's MultiThreadedConnectionManager so you could create a single RiakClient and share

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Abhishek Kona
On 25/02/11 2:07 AM, Russell Brown wrote: On 24 Feb 2011, at 17:20, Abhishek Kona wrote: Each thread has a RiakClient. RiakClient uses Apache HttpClient's MultiThreadedConnectionManager so you could create a single RiakClient and share it among your threads instead. Could you provide me an

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Russell Brown
On 24 Feb 2011, at 17:20, Abhishek Kona wrote: >>> Each thread has a RiakClient. >> RiakClient uses Apache HttpClient's MultiThreadedConnectionManager so >> you could create a single RiakClient and share it among your threads >> instead. > Could you provide me an example (sample code / test

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Abhishek Kona
On 24/02/11 10:21 PM, Russell Brown wrote: Thanks for getting back to me. On Thu, 2011-02-24 at 21:13 +0530, Abhishek Kona wrote: I'm wondering if you're sharing the same RiakClient between all threads or if each thread creates a RiakClient? Each thread has a RiakClient. RiakClient uses Apa

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Russell Brown
Thanks for getting back to me. On Thu, 2011-02-24 at 21:13 +0530, Abhishek Kona wrote: > > I'm wondering if you're sharing the same RiakClient between all threads > > or if each thread creates a RiakClient? > > > Each thread has a RiakClient. RiakClient uses Apache HttpClient's MultiThreadedConn

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Abhishek Kona
Hi Russel, On 24/02/11 7:52 PM, Russell Brown wrote: On Thu, 2011-02-24 at 17:58 +0530, Abhishek Kona wrote: Hi Thanks for the quick reply. On 24/02/11 5:03 PM, Russell Brown wrote: Hi Abhishek, On Thu, 2011-02-24 at 16:05 +0530, Abhishek Kona wrote: Hi In our tests with RIAK the Java HTTP

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Russell Brown
On Thu, 2011-02-24 at 17:58 +0530, Abhishek Kona wrote: > Hi > Thanks for the quick reply. > On 24/02/11 5:03 PM, Russell Brown wrote: > > Hi Abhishek, > > > > On Thu, 2011-02-24 at 16:05 +0530, Abhishek Kona wrote: > >> Hi > >> > >> In our tests with RIAK the Java HTTP Client is running out of fil

Re: Java HTTP Client running out of FD's

2011-02-24 Thread Russell Brown
Hi Abhishek, On Thu, 2011-02-24 at 16:05 +0530, Abhishek Kona wrote: > Hi > > In our tests with RIAK the Java HTTP Client is running out of file > descriptors (currently 1024). > The test runs with 64 threads. > > Has this behavior been observed by anyone before? > > Any insights would be help