You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redis comes configured with a default connection timeout of 300s. This can have a negative interaction with the current default configuration of the JedisPool such that in normal usage you can end up in a bad state (see issue 68). I propose that we set some default configuration for the pool that will alleviate this problem and perhaps save some developers some frustration when their pool stops working as expected:
My feeling is that this would have a much lower impact than checking every connection on borrow which would also work. Further, we should document additional configurations and best practices for accessing the pool and recovering from error conditions.
The text was updated successfully, but these errors were encountered:
Redis comes configured with a default connection timeout of 300s. This can have a negative interaction with the current default configuration of the JedisPool such that in normal usage you can end up in a bad state (see issue 68). I propose that we set some default configuration for the pool that will alleviate this problem and perhaps save some developers some frustration when their pool stops working as expected:
GenericObjectPool.Config poolConfig = new GenericObjectPool.Config();
poolConfig.testWhileIdle = true;
poolConfig.minEvictableIdleTimeMillis = 60000;
poolConfig.timeBetweenEvictionRunsMillis = 30000;
poolConfig.numTestsPerEvictionRun = -1;
My feeling is that this would have a much lower impact than checking every connection on borrow which would also work. Further, we should document additional configurations and best practices for accessing the pool and recovering from error conditions.
The text was updated successfully, but these errors were encountered: