-
Notifications
You must be signed in to change notification settings - Fork 3.9k
FAQ
Marcos Nils edited this page May 14, 2015
·
9 revisions
Try setting own timeout
value when constructing JedisPool
using the following constructor:
JedisPool(GenericObjectPool.Config poolConfig, String host, int port, int timeout)
Default timeout
value is 2 seconds.
JedisPool defaults to 8 connections, you can change this in the PoolConfig:
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(maxTotal); // maximum active connections
poolConfig.setMaxIdle(maxIdle); // maximum idle connections
Take into account that JedisPool
inherits commons-pool BaseObjectPoolConfig which has a lot of configuration parameters.
We've set some defined ones which suit most of the cases but you experience issuessometimes tuning those parameters helps.