Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@justinpolygon
Copy link
Collaborator

@justinpolygon justinpolygon commented Sep 27, 2023

Fixes #525.

If this update makes sense we should probably update the other client libraries with similar logic. Happy to have feedback here on if this PR makes sense.

Updated the existing retry logic by adding more HTTP status codes that should trigger a request retry. The default urllib3 status codes to retry on are 413, 429, 503. In this update, HTTP status codes to retry on has been updated to 413, 429, 500, 502, 503, 504 via the status_forcelist in the retry strategy, to accommodate a larger spectrum of server and client errors, especially those pertaining to temporary gateway or server issues.

Default status codes to retry on:

  • 413: Request Entity Too Large
  • 429: Too Many Requests
  • 503: Service Unavailable

Added these status codes:

  • 500: Internal Server Error
  • 502: Bad Gateway
  • 504: Gateway Timeout

Additionally, the backoff_factor was modified to 0.1 to facilitate a gradual backoff between retries using 0.0s, 0.2s, 0.4s, 0.8s, 1.6s, .... These modifications aim to improve the client retry logic against transient server problems and reliability of the client's HTTP requests in various situations.

@justinpolygon justinpolygon merged commit 26048f4 into master Sep 27, 2023
@justinpolygon justinpolygon deleted the jw-client-retry-logic branch September 27, 2023 17:53
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

Successfully merging this pull request may close these issues.

library does not retry on 504 timeout errors

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.