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

可能是因为超时时间设置太短造成的,这个参数是毫秒,尽量设置大点。我设置了30000 ,也就是30秒。

jedisPool = new JedisPool(new JedisPoolConfig(), host, port,30000,password);
因为我使用其它client都是正常的,所以刚开始没有想到这个原因,希望对同问的小伙伴儿们有所帮助。

猜你喜欢

转载自blog.csdn.net/oceanyang520/article/details/79789929