Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default JedisPool configuration to work smoothly with Redis default configuration #73

Closed
spullara opened this issue Dec 28, 2010 · 1 comment

Comments

@spullara
Copy link

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.

@xetorthio
Copy link
Contributor

this is done in master as part of this pull request #79

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants