Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker hub raise an error while trying to deploy a new machine with mastodon. #327

Open
Mahmoud-Emad opened this issue Nov 15, 2022 · 10 comments
Labels
process_wontfix This will not be worked on type_bug Something isn't working
Milestone

Comments

@Mahmoud-Emad
Copy link

Mahmoud-Emad commented Nov 15, 2022

While I deploy a new machine with mastodon flist, my instance takes a much minute then I logged in to the machine then tracked the machine logs then got it.

[+] mastodon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

at the same time, this issue happened with @maayarosama and @Omarabdul3ziz

so after some research, I got the reason from StackOverflow

The pull limit is a rolling limit that should reset parts of the quota 6 hours after that part of the quota was used. E.g. of you do 25 pulls every hour, then after the 4th hour, you need to wait 2 hours for the first 25 pulls to be added back to your quota.

Anonymous pulls are based on the IP performing the pull, and if you are behind a proxy or NAT, that may mean others on the same network are included in your limit. So if you see the limit continue to be reached after 6 hours, there are most likely others on the network pulling from the hub with your same source IP from the NAT.

Logging in with a free Hub account doubles this limit and is based on login rather than source IP, allowing different users behind a NAT to pull without conflicting with each other.

Therefore you should include credentials with your pull commands, using docker login or the equivalent for the tool you use to pull.

so I just asking, what if we are alive with many clients, then +200 clients deployed machines at the same time or at least within 6 hours, as I understand we will see this issue again.

@mohamedamer453 mohamedamer453 added the type_bug Something isn't working label Nov 21, 2022
@mohamedamer453 mohamedamer453 added this to the later milestone Nov 21, 2022
@xmonader
Copy link

@robvanmieghem / @delandtj what do you suggest in general for solutions requiring docker images ?

@xmonader xmonader moved this to Accepted in 3.10.x Feb 26, 2023
@xmonader xmonader modified the milestones: later, 3.10 Feb 26, 2023
@robvanmieghem
Copy link

fuck docker hub

While I deploy a new machine with mastodon flist

why does this still need to pull from docker hub?

@Mahmoud-Emad
Copy link
Author

why does this still need to pull from docker hub?

because we have maybe around 5 images, we have to pull all of them in the docker-compose to have a stable mastodon instance.

@robvanmieghem
Copy link

which ones?

@Mahmoud-Emad
Copy link
Author

  • postgres:14-alpine
  • redis:7-alpine
  • threefolddev/mastodon:latest

we use threefolddev/mastodon:latest in the sidekiq, streaming, and web services.

@robvanmieghem
Copy link

robvanmieghem commented Feb 27, 2023

There is a pretty straight forward solution to set up a Registry as a pull through cache

It does say

Mirrors of Docker Hub are still subject to Docker’s fair usage policy.

So I have no clue if this is going to solve the problem.

@robvanmieghem
Copy link

robvanmieghem commented Feb 27, 2023

  • postgres:14-alpine
  • redis:7-alpine
  • threefolddev/mastodon:latest

we use threefolddev/mastodon:latest in the sidekiq, streaming, and web services.

threefolddev/mastodon should not be on docker hub imho but on ghcr.io

@ashraffouda
Copy link

ashraffouda commented Sep 24, 2024

we need to find a solution to this issue as this keeps happening

@ashraffouda ashraffouda reopened this Sep 24, 2024
@Mahmoud-Emad
Copy link
Author

@ashraffouda Deploying our registry can't solve this issue?

@scottyeager
Copy link

Setting up a registry mirror as a pull through cache (or two for good measure since Docker supports adding multiple) would be simple enough. Then the Docker config for our images would just need an update to use those.

The potential problem I see is that in the naive configuration these are open to the public and could be abused. I don't see a solution for limiting their use to Zos nodes. What might be feasible would be limiting the images served by the mirrors to those we actually use in solution deployments.

I'm not a huge fan of asking users to input Docker credentials before deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process_wontfix This will not be worked on type_bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants