{"record":{"id":"4c7fdab2ddfcbf8a","repo":"ansible/ansible","slug":"retry-limit-exceeded-d","errorCode":null,"errorMessage":"Retry limit exceeded: %d","messagePattern":"Retry limit exceeded: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"lib/ansible/module_utils/api.py","lineNumber":109,"sourceCode":"            ret = f(*args, **kwargs)\n            return ret\n\n        return ratelimited\n    return wrapper\n\n\ndef retry(retries=None, retry_pause=1):\n    \"\"\"Retry decorator\"\"\"\n    def wrapper(f):\n\n        def retried(*args, **kwargs):\n            retry_count = 0\n            if retries is not None:\n                ret = None\n                while True:\n                    retry_count += 1\n                    if retry_count >= retries:\n                        raise Exception(\"Retry limit exceeded: %d\" % retries)\n                    try:\n                        ret = f(*args, **kwargs)\n                    except Exception:\n                        pass\n                    if ret:\n                        break\n                    time.sleep(retry_pause)\n                return ret\n\n        return retried\n    return wrapper\n\n\ndef generate_jittered_backoff(retries=10, delay_base=3, delay_threshold=60):\n    \"\"\"The \"Full Jitter\" backoff strategy.\n\n    Ref: https://www.awsarchitectureblog.com/2015/03/backoff.html\n","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/ansible/ansible/blob/9cf16a4aca7898481c257f1e17ad28d0b67b1f85/lib/ansible/module_utils/api.py#L91-L127","documentation":"Error \"Retry limit exceeded: %d\" thrown in ansible/ansible.","triggerScenarios":"Thrown at lib/ansible/module_utils/api.py:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase the retry limit or fix the underlying repeated failure.","Check connectivity or service availability causing retries."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9cf16a4aca7898481c257f1e17ad28d0b67b1f85","analyzedAt":"2026-08-15T00:15:47.100Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}