question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RedisTimeoutException: Unable to get connection

See original GitHub issue

Expected behavior

Should work without any exception.

Actual behavior

Getting the following exception intermittently:

WARN  - org.redisson.client.RedisTimeoutException: Unable to get connection! Node source: NodeSource [slot=null, addr=null, redisClient=null, redirect=null, entry=MasterSlaveEntry [masterEntry=[freeSubscribeConnectionsAmount=1, freeSubscribeConnectionsCounter=50, freeConnectionsAmount=32, freeConnectionsCounter=128, freezed=false, freezeReason=null, client=[addr=redis://my.server.2.1.com:6379], nodeType=MASTER, firstFail=0]]], command: (INCR), command params: [mycommand:params] after 3 retry attempts org.redisson.client.RedisTimeoutException: Unable to get connection! Node source: NodeSource [slot=null, addr=null, redisClient=null, redirect=null, entry=MasterSlaveEntry [masterEntry=[freeSubscribeConnectionsAmount=1, freeSubscribeConnectionsCounter=50, freeConnectionsAmount=32, freeConnectionsCounter=128, freezed=false, freezeReason=null, client=[addr=redis://my.server.2.1.com:6379], nodeType=MASTER, firstFail=0]]], command: (INCR), command params: [mycommand:params] after 3 retry attempts
	at org.redisson.command.CommandAsyncService$10.run(CommandAsyncService.java:703) ~[redisson-2.14.1.jar:?]
	at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:670) ~[netty-common-4.1.31.Final.jar:4.1.31.Final]
	at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:745) ~[netty-common-4.1.31.Final.jar:4.1.31.Final]
	at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:473) ~[netty-common-4.1.31.Final.jar:4.1.31.Final]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

Steps to reproduce or test case

I have no idea when this occurs.

Redis version

4.0.11

Redisson version

2.14.1

Redisson configuration

ReplicatedServers. Please let me know if any specific setting is required.

What are the possible reasons for this exception? How to fix this?

Well, we don’t have too much load on the servers.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
hlmscommented, Jan 25, 2019

Yep, There was failover… It was a server side issue. Not a client side issue.

0reactions
nishubincommented, Sep 17, 2022

Hi, have you solved this problem? I have the same problem in production。

Redisson version 3.9.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redisson client ; RedisTimeoutException issue - Stack Overflow
It seems there is no issue on redis cluster and i think i need to make tweaking in my client side redis connection...
Read more >
org.redisson.client.RedisTimeoutException.<init> java code ...
setException(new RedisTimeoutException("Unable to get connection! " + "Node source: " + source + ", command: " + command + ", command params: "...
Read more >
mrniko/redisson - Gitter
RedisTimeoutException : Unable to get connection! Try to increase 'nettyThreads' and 'connection pool' settings or set decodeIn
Read more >
Troubleshooting - Amazon ElastiCache for Redis
If the limit is reached, new connections will fail. ... If clients and the ElastiCache cluster are in different subnets, make sure that...
Read more >
Best practices for connection resilience - Azure Cache for Redis
Learn how to make your Azure Cache for Redis connections resilient. ... can cause Redis server connections to fail for 13 minutes or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found