More aggressive exception handling and retry logic. Refs #7755.
Import logging.
Merge pull request #8219 from cachedout/#7755

#7755 More aggressive re-try logic