Add connection failure recovery for the MongoDB