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

解决办法:调整JedisPoolConfig中maxActive为适合本身系统的阀值。html

<bean id="dataJedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig"> 
        <property name="maxActive" value="300"/> 
        <property name="maxIdle" value="100"/> 
        <property name="maxWait" value="10000"/> 
        <property name="testOnBorrow" value="true"/> 
</bean> 

参考:https://www.iteye.com/topic/1122212redis


 


 

 注:其它缘由备录:post

  • Jedis 对象用完之后,要释放掉,不让会一直占用,因此会出现没法获取新的资源。
  • 因为防火墙缘由没法链接到Redis
  • IP地址或端口错误(端口未开放)

转载于:https://www.cnblogs.com/LJing21/p/11526952.htmlspa