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

Retry after with give_up_after_secs #36

Open
rubentebogt opened this issue Sep 29, 2023 · 1 comment
Open

Retry after with give_up_after_secs #36

rubentebogt opened this issue Sep 29, 2023 · 1 comment
Assignees
Labels

Comments

@rubentebogt
Copy link

rubentebogt commented Sep 29, 2023

As promised; Enhancement questions:

  1. in testing it became clear to me that when i receive a 429 or 503 with a Retry-After header that exceeds the give_up_after_secs setting it will always retry the request once more after the give_up_after_secs time has passed.

So request one comes back as 503 with a Retry-After of 3600 seconds, and the give_up_after_secs is set to 120 seconds, it doesn't fail immediately, it will always retry once more after 120 second, i wonder why that is? And also i would maybe like a setting that handles the Retry-After more strictly then.

You see on some platforms we pay per request, if another platform is down for half an hour then retrying after the give up time passes eventhough the header said not to doesn't make any sense then for us.

  1. Also a nice addition in my opinion would be to have the Retry-After if present as diffInSeconds on the guzzle responseobject and therefor also in the RequestException object from guzzle. This wil allow us to interpret the header better using your code because it has already done so and release jobs in a queueing system back on the queue with the delay from the header after the above situation for instance.

  2. Do you maybe know if this package is compatible with this one: https://github.com/spatie/guzzle-rate-limiter-middleware, it would be cool to have this rate limiter package and retry middleware working close togheter. If you don't no need to test this, i can do that myself and report.

The situation that i have in mind is that requests will only be retried if the rate limiter is not hit when presented with a 503 etc..

@caseyamcl caseyamcl self-assigned this Oct 2, 2023
@caseyamcl caseyamcl added the bug label Oct 2, 2023
@rubentebogt
Copy link
Author

@caseyamcl is there any update on this, we are still experiecing this issue? If needed i can provide more details and how we see that it's still happening.

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

No branches or pull requests

2 participants