Riak 2 Netty BlockingOperationException

Alex Moore amoore at basho.com
Mon Dec 14 13:31:30 EST 2015


Hi Riak4me,

What are your min / max connection settings for the RiakNode objects you
have set up?

It looks like during your Update command, the Riak client attempted to get
another connection for the store, but you were out of available connections
and the thread blocked.  Netty doesn't like blocked threads, so it threw
the io.netty.util.concurrent.BlockingOperationException.

Thanks,
Alex

On Mon, Dec 14, 2015 at 12:28 PM, Riak4me <dehang.zheng at bluestembrands.com>
wrote:

> I am trying to use the Riak 2 java client. After some testing, I found that
> during a put request to Riak, I consistently get a
> BlockingOperationException from Netty. I've tried different connection
> configs, operation queue size..etc. Could this be a bug in usage of
> ChannelFuture.await? Thanks. Here's most of the stacktrace.
>
> io.netty.util.concurrent.BlockingOperationException:
> DefaultChannelPromise at 5da44ece(incomplete)
>         at
>
> io.netty.util.concurrent.DefaultPromise.checkDeadLock(DefaultPromise.java:396)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelPromise.checkDeadLock(DefaultChannelPromise.java:157)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
> io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:257)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:129)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
> io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:28)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
> com.basho.riak.client.core.RiakNode.doGetConnection(RiakNode.java:671)
> ~[riak-client-2.0.2.jar:na]
>         at
> com.basho.riak.client.core.RiakNode.getConnection(RiakNode.java:640)
> ~[riak-client-2.0.2.jar:na]
>         at com.basho.riak.client.core.RiakNode.execute(RiakNode.java:574)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.core.DefaultNodeManager.executeOnNode(DefaultNodeManager.java:90)
> ~[riak-client-2.0.2.jar:na]
>         at
> com.basho.riak.client.core.RiakCluster.execute(RiakCluster.java:321)
> ~[riak-client-2.0.2.jar:na]
>         at
> com.basho.riak.client.core.RiakCluster.execute(RiakCluster.java:239)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.api.commands.kv.StoreValue.executeAsync(StoreValue.java:118)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.api.commands.kv.UpdateValue$1.handle(UpdateValue.java:183)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.api.commands.ListenableFuture.notifyListeners(ListenableFuture.java:78)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.api.commands.CoreFutureAdapter.handle(CoreFutureAdapter.java:120)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.core.FutureOperation.fireListeners(FutureOperation.java:131)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.core.FutureOperation.setResponse(FutureOperation.java:170)
> ~[riak-client-2.0.2.jar:na]
>         at com.basho.riak.client.core.RiakNode.onSuccess(RiakNode.java:836)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> com.basho.riak.client.core.netty.RiakResponseHandler.channelRead(RiakResponseHandler.java:58)
> ~[riak-client-2.0.2.jar:na]
>         at
>
> io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:340)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:326)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:155)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:108)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:340)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:326)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:116)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:494)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:461)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
> [netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
> 16:44:36.569 ns-trinculo [nioEventLoopGroup-2-1] WARN
> i.n.channel.DefaultChannelPipeline - An exception was thrown by a user
> handler's exceptionCaught() method while handling the following exception:
> io.netty.util.concurrent.BlockingOperationException:
> DefaultChannelPromise at 5da44ece(incomplete)
>         at
>
> io.netty.util.concurrent.DefaultPromise.checkDeadLock(DefaultPromise.java:396)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelPromise.checkDeadLock(DefaultChannelPromise.java:157)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
> io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:257)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
>
> io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:129)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
> io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:28)
> ~[netty-all-4.0.17.Final.jar:4.0.17.Final]
>         at
> com.basho.riak.client.core.RiakNode.doGetConnection(RiakNode.java:671)
> ~[riak-client-2.0.2.jar:na]
>         at
> com.basho.riak.client.core.RiakNode.getConnection(RiakNode.java:640)
> ~[riak-client-2.0.2.jar:na]
>         at com.basho.riak.client.core.RiakNode.execute(RiakNode.java:574)
> ~[riak-client-2.0.2.jar:na]
>
>
>
> --
> View this message in context:
> http://riak-users.197444.n3.nabble.com/Riak-2-Netty-BlockingOperationException-tp4033787.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20151214/b45aa0aa/attachment-0002.html>


More information about the riak-users mailing list