What steps will reproduce the problem? 1. Connect a client or slave to a master via a proxy or loadbalancer (such as a LVS setup using TCP tunneling) 2. Keep the client idle for some time (depends on the config of the proxy or loadbalancer) 3.
What is the expected output? What do you see instead? Client should stay connected, and the socket/fd on both end stays open, but the connection is lost in the middle when the loadbalancer thinks the connection is no longer active or alive.
Instead I see the loadbalancer dropping the connection. Our setup uses TCP tunneling, so the breaking of the connection is not detected by either end of the connection, and particularly on the server-side, the amount of file descriptors open keeps rising. Having a client connection timeout set in the redis.conf is a workaround, but does not fix the issue.
What version of the product are you using? On what operating system?
1.2.6 - current stable
Please provide any additional information below.
I have a patch to add a configuration option to set proper TCP keepalive options on all client connections: http://github.com/trickie/redis/
Comment #1
Posted on Apr 6, 2010 by Massive KangarooMy patch (at least on Linux) adds an option to specify the interval in which to start sending probes, the same interval between probes, and will also break the connection when a probes reveals a broken connection
Comment #2
Posted on Apr 6, 2010 by Massive KangarooThe patch in the git tree doesn't quite apply on 1.2.6. Attached to this ticket is a patch for 1.2.6 that is combined with my replication sync patch from 203.
- redis-all-in-one.patch 12.33KB
Status: New
Labels:
Type-Defect
Priority-Medium