added max failure in redis