-
Notifications
You must be signed in to change notification settings - Fork 34
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
Extend HTTP timeout #803
Extend HTTP timeout #803
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshtemple doesn't this get over-ridden by the timeout on each request?
Yes, and I'm still not sure why I'm seeing a 5 sec |
Yeah, I'm good with that. |
This reverts commit 1f0252f.
Extends retries to all httpx.NetworkError (which will include ReadError) and increases the number of retries in the case of network errors while giving up for all non-502 status errors
9358a64
to
1972cff
Compare
Change description
We were not backing off and retrying on manifest changes, which was by design since often the manifest is not there and we don't want to retry a 404. However, we can still retry timeouts, so I've added backoff for that endpoint for timeouts but not status errors.
We were not backing off and retrying on
httpx.ReadError
, so I've used the parent classNetworkError
to catch this in our backoff logic.We were only retrying most requests 3 times by default. With exponential backoff, this isn't waiting that long in total. I've increased the number of retries to 10 for any network error or 502 status. I've ensured we give up immediately and don't retry on status error that isn't a 502.
Type of change
Related issues
Checklists
Security
Code review