Skip to content

Periodic PING causes RedisTimeoutException during IN_MEMORY batch execution with skipResult() #7377

Closed

Description

@kaiviq

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:

  1. Increasing pingConnectionInterval significantly while keeping skipResult() enabled.
  2. 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

  1. Emryswu commented on Oct 10, 2026

    @Emryswu
    Contributor

    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.

  2. added this to the 4.8.1 milestone on Oct 16, 2026
  3. added 2 commits that reference this issue on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions