JedisPool连接数问题

发布于 2024-11-14 08:50:57 字数 307 浏览 5 评论 0原文

我是 redis 新手,在我的多线程应用程序中使用 JedisPool。

 JedisPoolConfig config = new JedisPoolConfig();
 config.setMaxActive(200);
 config.setMaxIdle(200);
 pool = new JedisPool(config,"localhost",6379,-1,jedisPasswd);

我希望有 200 个连接且不会过期,但无论如何 当我的连接不超过 2 到 3 个时,我会错过什么吗 这里。

谢谢。

am new to redis and use a JedisPool in my multi-threaded app.

 JedisPoolConfig config = new JedisPoolConfig();
 config.setMaxActive(200);
 config.setMaxIdle(200);
 pool = new JedisPool(config,"localhost",6379,-1,jedisPasswd);

I want to have 200 connections with out getting expired, but at any
time I don't have more than 2 to 3 connections, Do I miss anything
here.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

欢烬 2024-11-21 08:50:57

您是否尝试过使用 setMinIdle() ?

Have you tried using setMinIdle() ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文