ropensci / rentrez

talk with NCBI entrez using R
https://docs.ropensci.org/rentrez
Other
194 stars 38 forks source link

API rate limit exceeded #156

Closed DannyArends closed 3 years ago

DannyArends commented 3 years ago

Hey all,

I'm using a for loop to make requests (no API key), nothing runs in parallel, but I am getting random errors regarding the API rate limit:

{"error":"API rate limit exceeded","api-key":"XXX.XXX.XXX.XXX","count":"4","limit":"3"}

I saw that there was already a pull request which updates the 1/3 to 0.34 (/R/base.r line 86), but testing that change still sometimes gives me 4 requests per second compared to 3

Could this be upped to 0.35 or 0.36 seconds of waiting time ?

dwinter commented 3 years ago

Hi @DannyArends ,

Sorry for not replying directly to this. rentrez 1.2.3 (on CRAN now) does a better job of handling the rate-limiting now and I've added a paragraph in the tutorial to suggest users add their own extra time if they hit this issue (https://cran.r-project.org/web/packages/rentrez/vignettes/rentrez_tutorial.html#slowing-rentrez-down-when-you-hit-the-rate-limit)