JedisPool连接数问题
我是 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过使用 setMinIdle() ?
Have you tried using setMinIdle() ?