-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
It seems like server has closed the connection #76
Comments
Jedis: 1.5.0 |
You need to configure the pool with "testOnBorrow = true" ... |
Thank you it works! |
Just to beat a dead horse a bit, might a good pool setup for a long running server process be as simple as: JedisPoolConfig config = new JedisPoolConfig(); |
when i use redis-2.2.2 and jedis-1.5.2 static { i got the following and do not know why,~~~~(>_<)~~~~ : redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1203) |
jedis with some error: when redis server send back "Protocol error" message , the server will close socket; but jedis Protocol.java just throw a JedisDataException exception and ignored tcp close segment; so if you reuse this connection, jedis will throw an exception with "It seems like server has closed the connection" message. |
Hi,
We are using redis in a web application. The Jedis poll is retreived through JNDI. Using Jetty, we have configured it like this:
So this is basically a pool of 4 to 10 connections. In our application the first requests goes well. But when we wait about 2-3 minutes and we refresh the page, redis crashed. The following code:
Jedis jedis = pool.getResource();
[...]
String v = jedis.get(s);
throws the exception:
Caused by: redis.clients.jedis.JedisException: It seems like server has closed the connection.
at redis.clients.util.RedisInputStream.readLine(RedisInputStream.java:90)
at redis.clients.jedis.Protocol.processBulkReply(Protocol.java:83)
at redis.clients.jedis.Protocol.process(Protocol.java:66)
at redis.clients.jedis.Protocol.read(Protocol.java:121)
at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:163)
at redis.clients.jedis.Connection.getBulkReply(Connection.java:153)
at redis.clients.jedis.Jedis.get(Jedis.java:68)
at net.playtouch.jaxspot.module.caching.redis.RedisTransactionalCache$1.execute(RedisTransactionalCache.java:28)
The text was updated successfully, but these errors were encountered: