On db connection failed, retry 10 times before shutting down the application