0
votes

My Jedis client sending the quit request internally causing the Redis server to close the connection. This is unexpected behavior. Below is the tcpdump of my host.

QUIT

17:12:17.702322 IP SOURCE_HOST.29039 > DEST_HOST.34250: Flags [P.], seq 1290557:1290562, ack 833190, win 65160, options [nop,nop,TS val 346069381 ecr 351399090], length 5
E..98\@.;...
%V.
W..qo....
.P.l.....U......
........+OK

17:12:17.702345 IP DEST_HOST.34250 > SOURCE_HOST.29039: Flags [.], ack 1290562, win 65366, options [nop,nop,TS val 351399092 ecr 346069381], length 0
E..4..@[email protected]

I am doing following operations.
1. get()
2. set()
3. setex()
4. ping()
5. del()
6. keys()

I am using Jedis: 2.9.3 with Kotlin.
Operation: Get the resource(connection) from JedisPool and send a request(ex. get()).
Does anyone have an idea why Jedis sends QUIT request without calling it explicitly?

1

1 Answers

0
votes
  1. JedisPool uses JedisFactory.
  2. destroyObject in JedisFactory calls quit.
  3. destroyObject of JedisFactory actually overrides destroyObject of PooledObjectFactory.
  4. GenericObjectPool uses PooledObjectFactory.
  5. destroy in GenericObjectPool calls destroyObject of PooledObjectFactory.
    • (and so destroyObject of JedisFactory) which results in a calling of quit.

There are many cases where destroy of GenericObjectPool is get called.