Wait for db to start