Patched mongodb backend to provide auto retry on mongo errors.