thom4parisot / hexo-algolia

Index your hexo website content to Algolia Search.
https://npmjs.com/hexo-algolia
MIT License
85 stars 15 forks source link

Can't upload indexes. Too many requests error. #44

Closed yelexin closed 3 years ago

yelexin commented 3 years ago

I have setup hexo algolia according to the docs. But when I ran $ hexo algolia, I couldn't upload the indexes to algolia. It said "Too many requests". I have been searching for days but I didn't find similar cases. Hope someone can help.

Here is the terminal output:

INFO  [hexo-algolia] Testing HEXO_ALGOLIA_INDEXING_KEY permissions.
INFO  Start processing
INFO  [hexo-algolia] 91 records to index (post, page).
INFO  [hexo-algolia] Indexing chunk 1 of 2 (50 records)
INFO  [hexo-algolia] Indexing chunk 2 of 2 (41 records)
ERROR [hexo-algolia] Too many requests
INFO  [hexo-algolia] Indexing done.
thom4parisot commented 3 years ago

Hi @yelexin,

I'm sorry you face this issue, it surprises me Have you started facing this problem recently?

I've ran an indexing a few minutes ago, and this is the result I have:

INFO  Validating config
INFO  [hexo-algolia] Testing HEXO_ALGOLIA_INDEXING_KEY permissions.
INFO  Start processing
INFO  [hexo-algolia] 404 records to index (post, page, reading-note).
INFO  [hexo-algolia] Indexing chunk 1 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 2 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 3 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 4 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 5 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 6 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 7 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 8 of 9 (50 records)
INFO  [hexo-algolia] Indexing chunk 9 of 9 (4 records)
INFO  [hexo-algolia] Indexing done.

On https://www.algolia.com/doc/faq/indexing/is-there-a-rate-limit/, one possible reason you hit a limit would be you somewhat have a bunch of items queued.

Try with the latest release of hexo-algolia, we'll see.

yelexin commented 3 years ago

Thanks for the quick response. I updated hexo-algolia to the latest version and deleted my algolia api keys and indexes in their dashboard and created a new one. Now I can upload indexes. 🎉

thom4parisot commented 3 years ago

Good! Glad it worked 🙂