Too many Redis connections

This graph shows the number of Redis connections climbing:

image

Let's take 10.1.0.39 as an example:

stanhu@worker14:~$ sudo lsof -i tcp:6379 | wc -l
89

But on the Redis server, I see:

stanhu@redis3:~$ sudo lsof -i tcp:6379 | grep 10.1.0.39 | wc -l
243

Most of these are in ESTABLISHED state. The Redis client list log shows that most of the connections are idling for a long time:

redis.log

I'm a little confused why there is such a big disparity between the server and the client as to how many open TCP connections to Redis there are: I would expect the numbers to be close.

/cc: @northrup