More sensible database wait