jellyfin / jellyfin-plugin-opensubtitles

https://jellyfin.org
GNU General Public License v3.0
131 stars 27 forks source link

API rate limit 429 too many requests #10

Closed flyer280 closed 5 years ago

flyer280 commented 5 years ago

Per https://forum.opensubtitles.org/viewtopic.php?t=16072 rate limit of 40 per 10 seconds per IP also includes a "RateLimit-Remaining" bucket.

Need to slow down the requests on machines that can process them faster than 40 per 10 seconds. And/or do them in bursts and stop before the limit and retry the last one that was denied after the limit is reset.

jaredallard commented 5 years ago

You could also naively just delay for X amount of time whenever a 429 occurs instead of adding burst / retry last logic