Try to reconnect to the mongo river every 15s (10x max) if the initial connection fails
Give some time to mongo to elect a primary