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就可以了。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM