If it's any help, this is the error when the threads start to hang:

2014-03-28 13:34:39,845 
[elasticsearch[Cerberus][transport_client_worker][T#16]{New I/O worker 
#2832}] (Log4jESLogger.java:129) WARN  
org.elasticsearch.netty.channel.socket.nio.AbstractNioSelector - Unexpected 
exception in the selector loop.
java.lang.OutOfMemoryError: Direct buffer memory
        at java.nio.Bits.reserveMemory(Bits.java:658)
        at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
        at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
        at 
org.elasticsearch.common.netty.channel.socket.nio.SocketReceiveBufferAllocator.newBuffer(SocketReceiveBufferAllocator.java:64)
        at 
org.elasticsearch.common.netty.channel.socket.nio.SocketReceiveBufferAllocator.get(SocketReceiveBufferAllocator.java:41)
        at 
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:62)
        at 
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
        at 
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
        at 
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
        at 
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at 
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at 
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)



On Friday, March 28, 2014 10:16:35 AM UTC, [email protected] wrote:

> Hi,
>
> When running the bulk indexing with python everything works fine.. good 
> solid throughput for the full indexing run.
>
> When doing the same with the Java api what is happening is that thousands 
> of client threads are being created (7000)
>
> And the server stops indexing and then the client just hangs with direct 
> buffer memory errors being displayed ie
>
> Exception: error [Direct buffer memory]
>
> Also I notice this in the dmesg: possible SYN flooding on port 9300. 
> Sending cookies. (not sure if related)
>
> I can't understand why ES is creating so many client threads because I'm 
> using:
>
> BulkResponse bulkResponse = bulkRequest.execute().actionGet();
>
> which is synchronous? And the ES threads should not exceed my client 
> threads?
> I have tried both nodeClient and transportClient and same thing.
>
> Any help appreciated.
>
> Thanks.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/65de0d91-041f-483b-b0e9-9bcc855a3a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to