-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Enhancement][Deviantart?] Change HTTP 429 backoff from linear to exponential #1560
Comments
A quick test with changing line 1120 in deviantart.py from This was the console output:
Not too sure why there was a 30s at the end, and line 1108 needs to be changed to Edit: It appears the self.delay approach only applies to the Deviantart extractor. Is there something else I should be looking for in the other files or is this it? |
It was exponential for the longest time, but got changed to linear in f6fd449. I've had more than enough experience with their rate limiting system where I can tell you that exponential does not work a advertised, at least not in the long run when downloading more than 100 files. You eventually end up with a very high exponent and incredibly long waiting times. Limiting the exponent to <10 helped, but waiting ~8min for each download is still too much. Downloading a single file with default API credentials only got up to 5s delay just now, which would've been 2**4 == 16s with exponential backoff. You are best off registering your own application and using the |
If anyone would know, it's you |
So I just tried downloading a single file from DeviantArt, which tends to give a lot of 429's
The first 31 lines were, and I quote:
Totaling of 493 seconds, or 8.2 minutes. Which, frankly, was more amusing than anything.
Ignoring how the last delay went down for some reason, this would've gone by significantly faster if the delay doubled each time instead of going up by 1 second.
If the delay went 1s, 2s, 4s, 8s, etc. it would've taken about 63 seconds. Possibly less if the Deviantart API docs on 429's (which also recommend an exponential backoff) are to be believed about an adaptive rate-limiting scheme
The text was updated successfully, but these errors were encountered: