Repository navigation
Description
Redis version
7.2
Redisson version
4.7.0/4.8.0
Redisson configuration
Redisson is configured in SingleServer mode and used for high-throughput RedisJSON loading with RediSearch.
The following batch configuration is used:
BatchOptions options = BatchOptions.defaults()
.executionMode(BatchOptions.ExecutionMode.IN_MEMORY)
.skipResult();
RBatch batch = redissonClient.createBatch(options);
// Add JSON.SET commands
batch.executeAsync();
The application typically submits batches containing 30 000 (tested with values from 5 000 to 50 000 with same results) JSON.SET operations, with multiple batches executing asynchronously.
The issue occurs with relatively short pingConnectionInterval values (e.g. 20–40 seconds).
Two configuration changes independently resolve the issue:
- Increasing pingConnectionInterval significantly while keeping skipResult() enabled.
- Removing skipResult() while keeping the shorter PING interval.
Increasing only setTimeout() does not resolve the issue.
What is the Expected behavior?
Periodic PING health checks should not interfere with ongoing batch execution, including batches using IN_MEMORY execution mode with skipResult() enabled.
Batch commands should be sent and processed reliably regardless of the configured PING interval, assuming the Redis connection remains healthy.
What is the Actual behavior?
When skipResult() is enabled and the PING interval is relatively short, Redisson intermittently throws exceptions such as:
Command write timeout:
org.redisson.client.RedisTimeoutException: Command still hasn't been written into connection! Check CPU usage of the JVM. Check that there are no blocking invocations in async/reactive/rx listeners or subscribeOnElements method. Check connection with Redis node: <ip> for TCP packet drops. Try to increase nettyThreads setting. Netty pending tasks: 0, Node source: NodeSource [slot=null, addr=null, redisClient=null, redirect=null, entry=MasterSlaveEntry [masterEntry=ClientConnectionsEntry{connectionsHolder=ConnectionsHolder{allConnections=4, freeConnections=3, freeConnectionsCounter=value:31:queue:0}, pubSubConnectionsHolder=ConnectionsHolder{allConnections=1, freeConnections=1, freeConnectionsCounter=value:50:queue:0}, freezeReason=null, client=[addr=<ip>], nodeType=MASTER, availabilityZone=null, initialized=false}]], connection: RedisConnection@2002198812 [redisClient=[addr=<ip>], channel=[id: 0x08180964, L:/<ip> - R:<ip>], currentCommand=CommandData [command=(PING), params: [], promise: java.util.concurrent.CompletableFuture@a98d265[Not completed, 35 dependents], codec=org.redisson.client.codec.StringCodec], usage=1], command: null, params: null after 3 of 3 retry attempts
org.redisson.command.RedisExecutor.lambda$scheduleRetryTimeout$0(RedisExecutor.java:323)
io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:717)
io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)
io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:705)
io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:791)
io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:501)
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30
java.base/java.lang.Thread.run(Thread.java:1583)
PING execution timeout:
org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=<ip>]
at org.redisson.client.RedisConnection.lambda$async$2(RedisConnection.java:300)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:717)
at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:705)
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:791)
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:501)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)
When these errors occur, some RedisJSON documents are not successfully loaded to Redis.
Increasing the PING interval significantly or removing skipResult() eliminates the observed loading failures.
Additional information
Could there be an interaction between periodic PING commands and the response suppression mechanism used by skipResult()?
If skipResult() temporarily disables Redis replies using CLIENT REPLY OFF, a PING issued on the same connection during that period might not receive a PONG response.
Activity
Emryswu commentedon Oct 10, 2026
Hi, I'd like to work on this. I'll look into how the periodic PING interacts with CLIENT REPLY OFF used by skipResult() and open a PR with a test.
Fixed - periodic PING closes connection during batch execution #7377
Merge pull request #7380 from Emryswu/fix-7377-ping-skipresult