Instead a flaky timer, use proper "wait" mechanisms so that the server starts after the database is ready for connections.