开发者

JedisPool number of connections issue

开发者 https://www.devze.com 2023-03-10 18:00 出处:网络
am new to redis and use a JedisPool in my multi-threaded app. JedisPoolConfig config = new JedisPoolConfig();

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);
开发者_StackOverflow中文版

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.


Have you tried using setMinIdle() ?

0

精彩评论

暂无评论...
验证码 换一张
取 消