1. check database connection before start application.