gpt4 book ai didi

java - JedisPool 连接数问题

转载 作者:IT王子 更新时间:2023-10-29 06:01:45 27 4
gpt4 key购买 nike

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

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

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

谢谢。

最佳答案

您尝试过使用 setMinIdle() 吗?

关于java - JedisPool 连接数问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6262500/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com