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

Could not get a resource from the pool #844

Closed
feidaodalian opened this issue Jan 8, 2015 · 3 comments
Closed

Could not get a resource from the pool #844

feidaodalian opened this issue Jan 8, 2015 · 3 comments

Comments

@feidaodalian
Copy link

Hi ,Ihave a question,my jedis 2.6.2and redis is 2.6.4,Sometimes I use jedisPool,,Exception appear " redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
......................................
Caused by: java.util.NoSuchElementException: Unable to validate object
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:502)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:361)
at redis.clients.util.Pool.getResource(Pool.java:48)
"
But,My jedisPoolConfig is "
maxTotal" value="5000"
"maxIdle" value="1000"
"minIdle" value="50"
"maxWaitMillis" value="1000"
"testOnBorrow" value="true"
"testOnReturn" value="true"
"testWhileIdle" value="true"
"

@marcosnils
Copy link
Contributor

@feidaodalian, have you checked this?

#661

@Gillingham
Copy link

The default JedisPool size is really small, that should be mentioned in the docs. There is #739 open currently.

I was running into the same issue where randomly during a lot of writes to redis I would get the same error message, I solved this by increasing the pool max size via JedisPoolConfig setMaxTotal()

@marcosnils
Copy link
Contributor

Wiki has been updated accordingly

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

3 participants