Have Couchbase 5.1, elasticsearch 4.2 and try to sync data to elasticsearch.
After about 50K items, connector starts to fail as following:
Java.lang.OutOfMemoryError: Direct buffer memory
14:47:51.334 [dcp-io-1-6] WARN c.c.c.d.d.i.n.c.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:175) ~[?:?]
at java.nio.DirectByteBuffer.(DirectByteBuffer.java:118) ~[?:?]
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:317) ~[?:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:758) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:734) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:245) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.PoolArena.allocate(PoolArena.java:227) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.PoolArena.allocate(PoolArena.java:147) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:356) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:178) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.buffer.AbstractByteBufAllocator.ioBuffer(AbstractByteBufAllocator.java:139) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.channel.DefaultMaxMessagesRecvByteBufAllocator$MaxMessageHandle.allocate(DefaultMaxMessagesRecvByteBufAllocator.java:114) ~[dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:147) [dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [dcp-client-0.28.0.jar:?]
at com.couchbase.client.dcp.deps.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [dcp-client-0.28.0.jar:?]
at java.lang.Thread.run(Thread.java:834) [?:?]