Don't stop monitoring after five retries

(cherry picked from commit 51c840705bc4eea9e44f658ab19002a67692af01)