I've had this problem in the past as well. I'm sure there's a setting to fix it but I've always just been lazy and call .quit from my code when I'm done with a connection. This runs the QUIT command on Redis and then Redis shuts down the connection immediately instead of wait for it to be timed out.