Add retry for DB errors