JedisConnectionException: Could not get a resource from the pool
See original GitHub issueI 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:
- Created 7 years ago
- Comments:11 (1 by maintainers)
@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?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 differenceApologies, my configuration was wrong