Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement exponential backoff on http 429 errors #1432

Open
lovasoa opened this issue Aug 20, 2023 · 0 comments
Open

implement exponential backoff on http 429 errors #1432

lovasoa opened this issue Aug 20, 2023 · 0 comments

Comments

@lovasoa
Copy link

lovasoa commented Aug 20, 2023

Hello !
Recently, I've had issues to run a large workflow that used to run fine.
actions/checkout@v3 fails with the following message: The requested URL returned error: 429.

Run actions/checkout@v3
Syncing repository: lovasoa/sqlx-oldapi
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/953a1d70-3933-4dbc-9926-54293e0cd10e' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/sqlx-oldapi/sqlx-oldapi
Deleting the contents of '/home/runner/work/sqlx-oldapi/sqlx-oldapi'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +5eeb386d401944bbb77fe04d859d7400cc56f13c:refs/remotes/origin/main
  Error: fatal: unable to access 'https://github.com/lovasoa/sqlx-oldapi/': The requested URL returned error: 429
  The process '/usr/bin/git' failed with exit code 128
  Waiting 19 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +5eeb386d401944bbb77fe04d859d7400cc56f13c:refs/remotes/origin/main
  Error: fatal: unable to access 'https://github.com/lovasoa/sqlx-oldapi/': The requested URL returned error: 429
  The process '/usr/bin/git' failed with exit code 128
  Waiting 15 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +5eeb386d401944bbb77fe04d859d7400cc56f13c:refs/remotes/origin/main
  Error: fatal: unable to access 'https://github.com/lovasoa/sqlx-oldapi/': The requested URL returned error: 429
  Error: The process '/usr/bin/git' failed with exit code 128

In the logs, one can see that the retry delay decreases instead of increasing between retries.

Maybe this action should detect 429 (too many requests) error, and try to avoid sending too many requests by implementing exponential backoff (or following the retry instructions sent in the HTTP response headers if any).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant