I have a simple single-threaded Java client for Riak that consistently runs out
of memory creating threads.
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:658)
at
java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:703)
at
java.util.concurrent.ThreadPoolExecutor.prestartCoreThread(ThreadPoolExecutor.java:1381)
at
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:222)
at
java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:443)
at
com.basho.riak.pbc.RiakConnectionPool.doStart(RiakConnectionPool.java:232)
at
com.basho.riak.pbc.RiakConnectionPool.access$100(RiakConnectionPool.java:41)
at
com.basho.riak.pbc.RiakConnectionPool$State$1.start(RiakConnectionPool.java:58)
at
com.basho.riak.pbc.RiakConnectionPool.start(RiakConnectionPool.java:227)
at com.basho.riak.pbc.RiakClient.<init>(RiakClient.java:90)
at com.basho.riak.pbc.RiakClient.<init>(RiakClient.java:81)
at
com.basho.riak.client.raw.pbc.PBClientAdapter.<init>(PBClientAdapter.java:91)
at com.basho.riak.client.RiakFactory.pbcClient(RiakFactory.java:107)
The client is a JUnit test for some data structures I'm storing in Riak. When I
run it, my Java client process starts about 2028 native threads before it
collapses.
This JUnit test creates a moderately large number of IRiakClient objects, but
only one at a time. It does not close them, as there is no method for doing so.
This happens with Riak 1.0.2 and with Riak 1.1.0RC2. As I've said, the client
is single-theaded.
Any ideas?
Cheers,
John
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com