-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out #1561
Comments
You're using an extremely old Jedis version which we don't support anymore :( |
If so, should I upgrade the version? |
@ant103 I think there might be some binary compatibility issues. My suggestion would be to upgrade the dependency and then recompile your app to make sure. |
Thank you for your kind reply. |
@ant103 We're facing a similar issue in our production boxes. Was your issue resolved on upgrading to newer binaries?
Finally resulting in
@marcosnils I understand this is an old version, but could you please point me in the direction as to how I can debug this out? My last resort would be to upgrade the version. |
Found the issue. Explanation:
Unfortunately, we're facing some network issues these days due to which this call resulted in a SocketTimeout. When an exception is thrown from this particular line, none of the above callers handle this exception and close the connection. As @marcosnils suggested, its better to upgrade the version of spring-data-redis, if you're facing this connection leak. In our scenario, upgrading spring-data-redis has problems of upgrading other spring dependency framework and aspectj versions which are not compatible with some of our code. We're planning on taking this change as part of a bigger release. For now, we extended the RedisTemplate class overriding PS : I verified in spring-data-redis 1.6.4 and this bug was fixed. (Checked only this version as I wanted redis sentinel feature) |
I am still having this issue in 1.5.9.RELEASE of spring-boot-starter-data-redis |
You're using an extremely old Jedis version which we don't support
|
Am using the latest version of Jedis 2.9.0 with spring-data-redis 1.8.14.RELEASE, facing the same issue |
we got the same problem (as @cechaodeng ) with the version |
I've the same issue sometimes connecting to AWS Elasticache. |
we have been seeing these exceptions in live environment. Doesn't seem to happen in nonprod environments . Redis / Jedis Configurationspring-data-redis => 1.8.9.RELEASE Jedis version: 2.9.0Redis version: 3.2Java version: 1.8In the above thread it is mentioned that these exceptions could occur if you are using older version of spring-data-redis this could occur , but in our case we are using latest version and we are still seeing these exceptions |
we got the same problem with the version 2.9.0 @marcosnils |
we got the same problem in live production after run 1-2hours: spring-data-redis 1.8.6 any clue? |
Hi guys I don't know if help you, but, im my case, I was trying connect in Redis using SSL in the port 6379 in my localhost. So if possible, verify your connection is using SSL method or not and change de connection parameter to the correct scenario. |
Experiencing same issue. not using spring, but using version 2.9.0. funny thing is that i didn't get this when i was connecting to a redis instance running on a kubernetes cluster. |
just use spring-session-data-redis, |
@adrian-o is this for the application.properties? |
Excuse me, how do I solve the problem? |
I am facing a similar kind of issue. daily at 12 AM for a few seconds I am getting a time-out. any clue how to fix this? |
@snaketl how did you fix this? |
Actually never found a way to fix it, in case someone found I way, please share with us :) |
我已收到您的来信,谢谢!祝您生活愉快!
|
How did we solve this one we are facing the same issue in production.
we are getting intermittent timeouts with error. |
我已收到您的来信,谢谢!祝您生活愉快!
|
hey did you resolve this ? |
Has anyone found a resolution to this issue. I am also currently experiencing this issue.
|
Same here thanks |
Has anyone found a resolution? I have also tried setting the connection timeout. |
我已收到您的来信,谢谢!祝您生活愉快!
|
Any solutions? |
我已收到您的来信,谢谢!祝您生活愉快!
|
What I found: |
How did you solve the problem in the end? |
Expected behavior
No "read time out" should occur.
Actual behavior
"Read time out" often occurs in a live environment.
Steps to reproduce:
I understand that this post might not be related to this board, but as I can’t find any solution to it, I am writing here.
Please understand the situation.
Currently, I am using jedis version 2.1.
I am using pool setting as follow, and I often get “read time out”.
maxActive 600
maxIdle 800
minIdle 10
maxWait 100000
When it occurred, I suspected overload on the expected load capacity.
However, looking at the server index, I found that it also occurred when there is no overload as well.
It mostly occurs when it is reading hash type data.
If there is anything I can check to solve this, please let me know.
===================================
=> java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
#011at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:47)
#011at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:37)
#011at org.springframework.data.redis.connection.jedis.JedisConverters.toDataAccessException(JedisConverters.java:117)
#011at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:169)
#011at org.springframework.data.redis.connection.jedis.JedisConnection.get(JedisConnection.java:1008)
#011at org.springframework.data.redis.connection.DefaultStringRedisConnection.get(DefaultStringRedisConnection.java:264)
#011at org.springframework.data.redis.core.DefaultValueOperations$1.inRedis(DefaultValueOperations.java:46)
#011at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:51)
#011at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:185)
#011at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:153)
#011at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:86)
#011at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:43)
#011at com.nx.npa.dao.impl.NPPKMapDaoImpl.getUserMasterKeyByNxSN(NPPKMapDaoImpl.java:481)
===================================
Redis / Jedis Configuration
Sentinel
Master - Slave
Jedis version:
2.1
Redis version:
2.8.21
Java version:
openjdk 1.7
Etc:
spring-data-redis 1.1.0
commons-pool 1.5.7
Any help is good.
Thank you.
thanks.
The text was updated successfully, but these errors were encountered: