internetarchive / wayback-machine-webextension

A web browser extension for Chrome, Firefox, Edge, and Safari 14.
GNU Affero General Public License v3.0
651 stars 208 forks source link

Books POST API may timeout on long list of ISBNs #831

Open cgorringe opened 2 years ago

cgorringe commented 2 years ago

The context Books POST API may timeout on Wikipedia pages that have a large number of ISBNs. For example https://en.wikipedia.org/wiki/World_War_II may have 228 or 231 ISBNs.

When a timeout occurs, the API returns this error:

<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>

Either this may be solved on the backend, or an enhancement made to the frontend code to limit number of ISBNs sent to the API at a time. Let's say we send 100, then call the API again after each batch. May take some effort to rewrite the code.

applies to v2.999.28

cgorringe commented 2 years ago

Extending the timeout on the server endpoint fixes this issue for now.