Java HTTP Client running out of FD's

Russell Brown russell.brown at mac.com
Thu Feb 24 06:33:33 EST 2011


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 helpful.

Can you let me know what platform you are running on, version of Java
and which version of the client you are using, please?

Do you have the RiakConfig.setMaxConnections set to 64, too (or just
your test ThreadPool)?

Also, just to sanity check, are you running against a Riak node on the
same box?

> 
> -Thanks
> 
> 
> The stack trace :
>   Error running task 
> com.basho.riak.client.response.RiakIORuntimeException: 
> java.net.SocketException: Too many open files
>          at 
>
com.basho.riak.client.util.ClientHelper.executeMethod(ClientHelper.java:382)
>          at 
>
com.basho.riak.client.util.ClientHelper.executeMethod(ClientHelper.java:391)
>          at 
> com.basho.riak.client.util.ClientHelper.store(ClientHelper.java:160)
>          at
com.basho.riak.client.RiakClient.store(RiakClient.java:238)
>          at 
>
flipkart.platform.kv.riak.RiakWriterTask.testRun(RiakWriterTask.java:53)
>          at flipkart.platform.perftest.Task.run(Task.java:46)
>          at 
> java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
>          at 
> java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
>          at java.lang.Thread.run(Thread.java:662)
> Caused by: java.net.SocketException: Too many open files
>          at java.net.Socket.createImpl(Socket.java:397)
>          at java.net.Socket.<init>(Socket.java:371)
>          at java.net.Socket.<init>(Socket.java:249)
>          at 
>
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
>          at 
>
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
>          at 
>
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
>          at 
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
>          at 
>
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
>          at 
>
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>          at 
>
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
>          at 
>
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>          at 
>
com.basho.riak.client.util.ClientHelper.executeMethod(ClientHelper.java:364)
>          ... 8 more
> 
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com








More information about the riak-users mailing list