我是 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/