I have figured out why so many CLOSE_WAIT socket exists. The redis-py
maintains the connection_pool, when the redis-server closes the connection
on its side, redis-py instance would not react immediately. When the socket
whose peer-side closed by redis-server comes to use again, an error will be
raised and redis-py instance would close it and re-establish to the
redis-server. So the CLOSE_WAIT socket could disapper.
Thank you for you help! :)