-
Notifications
You must be signed in to change notification settings - Fork 481
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
[Bug]: "Match All Authors" with a big library will hit rate limits on Audible API and start getting 429s #1570
Comments
Would a client-side fix in Given that the endpoint is currently synchronous, it seems like a much bigger (and contract breaking) effort to turn it async and update the client accordingly, but I'm quite unfamiliar with this codebase so maybe there's something with the web socket that could be done without too much effort. |
Yeah I think a client-side fix is best here for the reason you pointed out. PR would be great. We can do it server side with web socket events but probably more effort then it is worth at this stage. We're working on a new model to handle long running tasks so in the future we could make a match all authors route. |
One issue that just occurred to me is if the user navigates while the loop is running |
Perhaps a second button "Search Missing Authors". To lower the search volume. |
To lower the api calls further, maybe implement a maintenance task to search only the newly added authors, for e.g after a library scan, queue an author's update scan if new authors were added. It will be high volume for the initial scan, but only searching for authors that have been added recently, probably after the last update, should only be queried, and also only authors not previously match in case they got an update. Similar to scan and force re-scan feature separation in case of library. And I do not know how the code structure is right now, but shouldn't this make more sense as a server-side feature instead of client side? I mean server is responsible for maintaining the db of books, scanning and updating, why not authors too, just send an update call to server and let it handle. For larger libraries, you have to keep the tab open, also it uses a lot of resources, not to mention all the notifications of foo author found, bar author not found freezing up my system briefly every now and then. |
Any news on this? My library is pretty large so doing a rescan is already pretty impossible. |
Describe the issueIn some of my AudioBookShelf library, I have hundreds of authors. When I attempt to do an author match using Authors → Match All Authors, I get a match on some authors, but errors on others, including well-known authors. A rescan results in some of those missed authors being matched up. When I review the servers logs, I see the following:
This tells me that AudioBookShelf is sending too many requests to api.audnex.us within a short period of time and needs to slow down and be rate limited to maybe one request every .25 to .5 seconds. Having author's being matched up is not a time-critical function, and waiting several minutes for the matching to complete should not be an unexpected condition. It may warrant a warning message when the administrator clicks on the Match All Authors that it may take some time to complete. Steps to reproduce the issue
Audiobookshelf version2.9.0 How are you running audiobookshelf?Docker |
fix: HTTP/429 when requesting authors information, resolves #1570
Thank you. Looking forward to the release! @advplyr |
Fixed in v2.11.0 |
Thank you! |
Not sure if this is fully fixed. Ran a match today after updating to 2.16 and got rate limited. Getting too many requewsts in the docker logs
} }` |
Open library isn't used for matching authors so that is unrelated to this |
Describe the issue
Expected behaviour
Ideally the requests would be queued server-side to throttle them to avoid exceeding the rate limit threshold
Actual behaviour
All lookups start to fail with 429s from Audible API. If your library is big enough, you may even get an IP ban
Steps to reproduce the issue
Audiobookshelf version
v2.2.4. I can update and re-test in a little while but for the next week or so I need it to be perfectly stable as I'm traveling
How are you running audiobookshelf?
Docker
The text was updated successfully, but these errors were encountered: