nodejs/node · error · Exception
Retried too often. Giving up. Reason: %s
Error message
Retried too often. Giving up. Reason: %s
What it means
Retry repeatedly calls cb, sleeping per the wait_plan backoff schedule, until either cb succeeds (and retry_on(result) is False) or wait_plan is exhausted. When the plan runs out while still failing/retrying, Retry raises a generic Exception whose message embeds the last failure as the Reason.
Source
Thrown at deps/v8/tools/release/common_includes.py:379
True if the function should be retried. A function throwing an
exception is always retried.
wait_plan: A list of waiting delays between retries in seconds. The
maximum number of retries is len(wait_plan).
"""
retry_on = retry_on or (lambda x: False)
wait_plan = list(wait_plan or [])
wait_plan.reverse()
while True:
got_exception = False
try:
result = cb()
except NoRetryException as e:
raise e
except Exception as e:
got_exception = e
if got_exception or retry_on(result):
if not wait_plan: # pragma: no cover
raise Exception("Retried too often. Giving up. Reason: %s" %
str(got_exception))
wait_time = wait_plan.pop()
print("Waiting for %f seconds." % wait_time)
self._side_effect_handler.Sleep(wait_time)
print("Retrying...")
else:
return result
def ReadLine(self, default=None):
# Don't prompt in forced mode.
if self._options.force_readline_defaults and default is not None:
print("%s (forced)" % default)
return default
else:
return self._side_effect_handler.ReadLine()
def Command(self, name, args, cwd=None):
cmd = lambda: self._side_effect_handler.Command(View on GitHub (pinned to 1b2de5e052)
Solutions
- Read str(got_exception) in the message — that is the real underlying failure to fix.
- Address the root cause (network, auth, remote availability).
- If the failure is genuinely transient, pass a longer wait_plan.
- For non-retryable failures, raise NoRetryException from cb to abort immediately instead of exhausting the plan.
Example fix
// before
self.Retry(cb, retry_on=lambda r: not r, [5])
// after (fail fast on permanent errors)
def safe_cb():
try: return cb()
except PermanentError as e: raise NoRetryException(e)
self.Retry(safe_cb, retry_on=lambda r: not r, [5, 30]) Defensive patterns
Strategy: try-catch
Try / catch
try:
result = self.Retry(cb, retry_on, wait_plan)
except Exception as e:
# The message embeds the last failure; surface it, don't mask it.
log.error('Retry exhausted: %s', e)
raise Prevention
- Raise NoRetryException from cb for permanent failures so you don't burn the whole wait_plan.
- Size wait_plan to the realistic recovery time of the dependency.
- Log the underlying exception, not just the wrapped message.
When it happens
Trigger: A transient operation (git, HTTP fetch, etc.) keeps failing across every slot in wait_plan.
Common situations: Network down for the whole retry window; git remote unreachable; trybot/buildbucket query consistently erroring; flaky endpoint that doesn't recover in time.
Related errors
- 'git %s' failed.
- Error %s writing to the output path "%s"
- Couldn't find curent branch.
- Couldn't determine commit position for %s
- Unexpected json output: %s
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/7a5fff2f86007035.
Report an issue: GitHub.