ClientOptions.builder()
.disconnectedBehavior(DisconnectedBehavior.REJECT_COMMANDS)
.requestQueueSize(500)
.pingBeforeActivateConnection(true)
.build());
redisClient.connectPubSub(RedisURI.create(host, port));
connectionPublish = redisClient.connectPubSub(RedisURI.create(host, port));
The number of client TCP connections went up to 10000.
From the heap dump - the number of ConnectionWatchDog instances shoots upto 1 million!!.
I am not able to attach an image here but thats the case.
Regards,
Abhay
diameter-endpoint-s105.weave.local 2019-01-22 12:04:12,525 [lettuce-eventExecutorLoop-10-11] ERROR c.l.r.protocol.ReconnectionHandler - Cannot initialize channel.
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at com.lambdaworks.redis.protocol.ReconnectionHandler.reconnect(ReconnectionHandler.java:87)
at com.lambdaworks.redis.protocol.ConnectionWatchdog.reconnect(ConnectionWatchdog.java:258)
at com.lambdaworks.redis.protocol.ConnectionWatchdog.run(ConnectionWatchdog.java:243)
at com.lambdaworks.redis.protocol.ConnectionWatchdog$2.lambda$run$393(ConnectionWatchdog.java:198)
at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: null
at com.lambdaworks.redis.protocol.RedisStateMachine.decode(RedisStateMachine.java:122)
at com.lambdaworks.redis.protocol.RedisStateMachine.decode(RedisStateMachine.java:90)
at com.lambdaworks.redis.pubsub.PubSubCommandHandler.decode(PubSubCommandHandler.java:50)
at com.lambdaworks.redis.protocol.CommandHandler.channelRead(CommandHandler.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
... 3 common frames omitted
Is this a side effect of the MAX number of clients reached or some other issue?
Regards,
Abhay
DefaultClientResources.builder().reconnectDelay(Delay.constant(1000, TimeUnit.MILLISECONDS)).build();
However i observe that the same exception (ERR Max clients) is more often,if i am guessing correct the said exception as per the above code snippet should be once every one second?
Should i explain more?
Regards,
Abhay
2019-01-22 12:04:14,694 [lettuce-eventExecutorLoop-10-10] ERROR c.l.r.protocol.ReconnectionHandler - Cannot initialize channel.
java.util.concurrent.ExecutionException: com.lambdaworks.redis.RedisCommandExecutionException: ERR max number of clients reached