-
Notifications
You must be signed in to change notification settings - Fork 19
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 amount #163
Labels
enhancement
New feature or improvement
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On our Discord server there has been a discussion about the Retry-After headers Spotify is sending. Reportedly they don't match the actual retry amount or the header is missing altogether (possibly also on Spotify's tracker spotify/web-api#542 and spotify/web-api#1267).
I tried to reproduce it, and managed to get the unwanted repeating retries, but not the missing retry header. Here's the code injected to
RetryingSender
.By tracking whether the last request was also a retry, we can see that indeed almost half of the requests are retried again.
It also seems that the retry amount in the second request is always 1, and that the repeating retry occurs more often with longer retry times. The requests are never retried thrice. And when looking at a longer series of values, the amount of retries and the share of second retries seems to have a pattern.
Everything works now because the second retries are performed, but by increasing the retry time by 1, the unnecessary retries are avoided entirely and we wait for less. For 145 retries, first retries took 450 seconds and second retries 100 seconds, but when adding the extra second the total was only 513 seconds.
So, given the possibility of missing headers and second retries, and the result of adding an extra second above, I think we should do two things:
The text was updated successfully, but these errors were encountered: