Schlabbi / docker-notify

Get a mail or call a webhook when a docker image gets updated.
MIT License
20 stars 15 forks source link

Rate limiter #19

Open Beholder1984 opened 2 years ago

Beholder1984 commented 2 years ago

I am trying to monitor 9 docker containers with docker-notify. After adding the last project docker-notify started spamming me with error messages. In the result from docker-hub I see messages containing the following:

statusCode: 429,
statusMessage: 'Too Many Requests',

Which suggests that I am making to many requests to Docker hub. Any suggestions on how I can monitor more then 8 projects?

Schlabbi commented 2 years ago

That's a bug. I should rework the DockerAPI implementation. Maybe we can also reduce the amount of requests that are currently made so we don't hit the rate limit as easily. So sorry, but until that is fixed, you will probably run into these errors.

rgstephens commented 2 years ago

@Beholder1984 What is your checkInterval? I'm monitoring 9 images with a 20 minute interval and haven't run into this problem.

Beholder1984 commented 2 years ago

@rgstephens my checkInterval is currently set to 60. Do you by any change have a subscription to docker hub. It seems that paying customers won't hit the rate limiter so fast.

rgstephens commented 2 years ago

No, I don't have a paid subscription and the code is not logging in with an id either.

TonyRL commented 2 years ago

https://github.com/TonyRL/docker-notify/pull/33 adds support for optional Docker Hub auth. You can now use your own personal plan account for double the limits (200 checks/6hrs vs 100 checks/6hrs). FYI, You can also use githubactions' account as it does not any rate limit.