jedis 不释放连接/jedis 泄漏连接/jedis 连接池随着时间的推移耗尽 [英] jedis not releasing connections / jedis leaking connections / jedis connection pool exhausted over time

查看:329
本文介绍了jedis 不释放连接/jedis 泄漏连接/jedis 连接池随着时间的推移耗尽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 tomcat 服务器并使用 jedis 客户端连接到它.

I've a tomcat server and using jedis client to connect to it.

我使用的jedis版本是3.0.0-m1"和tomcat 8.0.15

The jedis version I am using is "3.0.0-m1" and tomcat 8.0.15

连接后几个小时后,我看到以下异常.对此有什么帮助吗?

After connecting and after a few hours I see the below exceptions. Any help on this?

redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
        Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Failed connecting to host test-1234.catalog.com:1234
            Caused by: java.net.UnknownHostException: test-1234.catalog.com:1234

推荐答案

我的猜测是检查您的 Redis 服务器中的最大客户端数,也许 Jedis 池已达到最大数量并且服务器不接受任何新的连接.

My guess would be to check the max number of clients in your Redis server, maybe the Jedis pool has reached that max number and the server is not accepting any new connections.

这篇关于jedis 不释放连接/jedis 泄漏连接/jedis 连接池随着时间的推移耗尽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆