adding timeout to the mongo connection database