alanshaw / david-www

:eyeglasses: David helps keep your Node.js project dependencies up to date.
https://david-dm.org
MIT License
731 stars 131 forks source link

David is rate-limited #437

Closed nbsp closed 3 years ago

nbsp commented 3 years ago

As mentioned in alanshaw/david#174, David is rate-limited and therefore the badge looks like this:

and when clicking over to david-dm.org, this error appears:

FetchError: invalid json response body at https://david-dm.org/<username>/<repository>/info.json reason: Unexpected token < in JSON at position 0
    at /home/node/app/node_modules/node-fetch/lib/body.js:48:31
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 1)
    at async Promise.all (index 0)

Sometimes, instead of info.json, it appears as project.json, but everything else is the same.

According to this reply it seems that the problem lies with a deprecated GitHub client that is being used.

The problem fixed itself after a few minutes, but it's been a frustrating few minutes. Is there at least some sort of API token that could be used to up the limit?

alanshaw commented 3 years ago

I've deployed a new backend and hopefully this will happen less now. david-dm.org does use an api token and heavily caches responses however there are a lot of requests to make! It's now using a persistent cache so shouldn't run into rate limiting issues when restarting.

philihp commented 2 years ago

This appears to have happened again.