redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

  今天在链接redis时,遇到问题:

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

  Could not get a resource from the pool。

  

  redis的配置是:

  

    <bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
        <property name="maxTotal" value="150" />
        <property name="maxIdle" value="30" />
        <property name="minIdle" value="10" />
        <property name="maxWaitMillis" value="30000" />
        <property name="testOnBorrow" value="true" />
        <property name="testOnReturn" value="true" />
        <property name="testWhileIdle" value="true" />
    </bean>

  最后,把

testOnBorrow的值改为 FALSE就可以了。
时间: 2024-10-25 12:59:17

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool的相关文章

redis使用问题一:Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a resource from the pool] with root cause

首先说下redis最简单得使用,出去配置. 需要在你要使用得缓存得地方,例如mybatis在mapper.xml中加入: <cache eviction="LRU" type="cn.jbit.cache.RedisCache"/> 由于是第一次使用redis,再调试代码得时候报错:Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisEx

redis.clients.jedis.exception.JedisConnectionException:Could not get a resource from the pool

启动项目报该异常.原因是因为该项目是需要启动redis的,报错原因是因为没有安装redis或者没有手动启动redis,把redis设置成自启动就行了 一.下载windows版本的Redis 官网下载地址:http://redis.io/download github下载地址:https://github.com/MSOpenTech/redis/tags 二.安装Redis 1.这里下载的是Redis-x64-3.2.100版本,我的电脑是win7 64位,所以下载64位版本的,在运行中输入cm

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect time out

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed outat redis.clients.jedis.Connection.connect(Connection.java:154)at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:83)at redis.clients

redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set

1.项目启动报错: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool redis.clients.util.Pool.getResource(Pool.java:50) redis.clients.jedis.JedisPool.getResource(JedisPool.java:88) com.radiadesign.catalina.session.

redis.clients.jedis.exceptions.JedisDataException: ERR unknown command &#39;PSETEX&#39;

在spring中 针对 RedisTemplate类: private RedisTemplate<String, String> template; 当调用下面方法 template.opsForValue().set(key, value,times, timeUnit); 当指定timeUnit为TimeUnit.MILLISECONDS 将抛出下面异常 redis.clients.jedis.exceptions.JedisDataException: ERR unknown comm

redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots

最近在学习Redis ,在写test测试的时候碰到这个报错: redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis

redis.clients.jedis.exceptions.JedisDataException :READONLY You can&#39;t write

分布式直连同步调用测试时出现的错误:主从复制架构下,默认Slave是只读的,如果写入则会报错: redis.clients.jedis.exceptions.JedisDataException: READONLY You can't write 解决方案: 主redis修改redis.windows.conf文件中的    appendonly no redis.clients.jedis.exceptions.JedisDataException :READONLY You can't wr

redis JedisConnectionException: Could not get a resource from the pool

HTTP Status 500 - Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool type Exception report message Cannot get Jedis connection; nested exception is redis.cl

通过jedis连接redis单机成功,使用redis客户端可以连接集群,但使用JedisCluster连接redis集群一直报Could not get a resource from the pool

一,问题描述: (如题目)通过jedis连接redis单机成功,使用JedisCluster连接redis集群一直报Could not get a resource from the pool 但是使用redis客户端可以连接集群(我使用的redis desktop manager) 在java中通过jedis连接redis单机也成功,但使用JedisCluster连接redis集群一直报Could not get a resource from the pool, 我以命令行方式操作是没问题的