码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-08-25 21:41:07      阅读:298      评论:0      收藏:0      [点我收藏+]

标签:ret   exce   lis   idle   div   redis   cti   conf   property   

  今天在链接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就可以了。

 

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

标签:ret   exce   lis   idle   div   redis   cti   conf   property   

原文地址:http://www.cnblogs.com/parkdifferent/p/7429660.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!