wait for database to come up, rather than failing