Added mongo connection polling.