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.

JedisConnectionException: Could not get a resource from the pool

See original GitHub issue

I use spring-data-redis but it have a problem

<dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.7.3</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-redis</artifactId> <version>1.6.4.RELEASE</version> </dependency>

Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at redis.clients.util.Pool.getResource(Pool.java:50) at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99) at redis.clients.jedis.JedisPool.getResource(JedisPool.java:12) at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:155) at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:251) at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:58) at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:128) at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:91) at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:78) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:178) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:153) at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:86) at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:43)

i config is redis.pool.maxTotal=500 redis.pool.maxIdle=200 redis.pool.minIdle=10 redis.pool.maxWait=6000 redis.pool.testOnBorrow=false redis.pool.testOnReturn=false

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
marcosnilscommented, Oct 12, 2016

@gowrisankar22 seems like Jedis can’t reach your redis server. JedisConnectionExceptions are for connection problems between Jedis and your Redis instance. Can you check if you can reach the server using the redis CLI?

0reactions
owenj62commented, Feb 26, 2018

I’m also starting to face this issue using the default config, no solution as of yet. I installed redis through Brew if it makes any difference Apologies, my configuration was wrong

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not get a resource from the pool ... - Stack Overflow
I'm running multiple worker threads(around 10) to access the data from the redis Q. For the i'm using infinte timeout for Jedis Client....
Read more >
Could not get a resource from the pool ... - GitHub
JedisConnectionException : Could not get a resource from the pool at redis.clients.util.Pool.getResource(Pool.java:53) at redis.clients.jedis ...
Read more >
Could not get a resource from the pool ...
I'm running multiple worker threads(around 10) to access the data from the redis Q. For the i'm using infinte timeout for Jedis Client....
Read more >
What Should I Do If an Error Is Returned When I Use the Jedis ...
JedisConnectionException: Could not get a resource from the pool ... Check whether the IP address configured on the Jedis client is the same ......
Read more >
[redis-db] jedis - Could not get a resource from the pool
Hi, I'm using Jedis from a multi threaded environment and I'm getting this error code. Exception in thread "main" redis.clients.jedis.exceptions.
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