Java HTTP Client running out of FD's

Abhishek Kona abhishek.kona at gmail.com
Thu Feb 24 05:35:59 EST 2011


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.

-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




More information about the riak-users mailing list