wait for db to come up