try 3 times to connect to redis