Sleep before connecting to mongodb