Attempt to recover after database errors. refs #2820, #2762