If you get rate-limited by rubygems, you need to talk to rubygems. They explain how in their rate-limiting documentation. We can do absolutely nothing to help with rate-limiting problems. (This doesn’t just apply to the OP; everyone giving advice on this problem any time it occurs needs to refer people to rubygems, loudly, explicitly, and using words of no more than two syllables.)

I can’t see any specific error messages relating to the dropbox plugin in this thread. Without a complete error message and backtrace (if displayed in the logs), @Falco isn’t going to be able to do anything to fix whatever error might be going wrong.

It doesn’t make sense to me why in such situations we need to talk to rubygems. We are installing/Updating something that passes their thresholds. So I think their response would simply be for us to check the plugins we are trying to install. Am I right?

It doesn’t make sense to me why in such situations we need to talk to rubygems.

Because they’re the ones rate-limiting your requests.

hnaseri:

We are installing/Updating something that passes their thresholds. So I think their response would simply be for us to check the plugins we are trying to install.

I have no idea what their response would be. I don’t presume to speak for rubygems, which is why I suggest talking to them, to find out what they would say, and save all this guesswork.

pfaffman:

Their site says:

API and website: 10 requests per second

It also says

Some endpoints may be cached by our CDN at times and therefore may allow higher request rates.

and

The RubyGems.org team may occasionally blackhole user IP addresses for extreme cases to protect the platform.

Which means that the correct description of the rate limit is “10 requests per second, unless it isn’t”. Which is less than entirely helpful.

pfaffman:

Is it possible that the bootstrap script is doing that as a matter of course? Here’s an excerpt from a build just now:

If there were timestamps on that log, it would help to identify how quickly requests are actually being made. As it is, all we can see is “requests were made, and some got 429’d”. Also, according to that exerpt, as is, you got rate-limited after two successful requests, so either you’re hitting a blacklist (it’s hard to see how making three requests could get you to hit a 10 req/sec limit) or there’s other requests you didn’t show. Either way, though, without timestamps nobody can tell whether you might be hitting a limit or not.

pfaffman:

I’ve read where you (or someone on team) said that you guys aren’t using any kind of proxy and rebuild all the time, so I can’t make sense of what I’m seeing.

Exactly. We’ve got customers with some pretty monstrous plugin lists, and their rebuilds never get rate-limited that I’ve seen. Perhaps we do builds often enough that the CDN node we hit is kept constantly fresh with all the packages we need, which is… nice, I guess, but not helpful to anyone else.

Which is why, if you are seeing this problem, you should talk to rubygems so you can make sense of what you’re seeing, because our pontificating on meta about what may or may not be going on isn’t going to get the problem solved. If rubygems comes back with some actionable advice as to how Discourse and its environs can be modified to work better with rubygems rate-limits, great. Let us know, and we’ll look into it. However, having someone from Discourse directly talk to rubygems isn’t going to help, because we’re not seeing the problem. We can’t provide any useful diagnostic data (such as source IPs, timestamps, or anything) to rubygems, nor can we describe how to reliably (or otherwise) reproduce the problem.

So… once again, if you are seeing rate-limiting problems with rubygems, talk to rubygems. If you’re not willing to do that, then please don’t complain about being rate-limited here on meta, because all you’re doing is adding to the noise, not the signal, about this problem.

This issue still exists. “Talking to rubygems” cannot be an option. If an application is hitting a ratelimit by 3rd party, the application has to take care of building requests not exceeding the limits and/or to retry failed downloads after a safe period until the downloads are done.

Probably interesting to know that rubygems.org is using GEO location based DNS. Therefore they are able to respond very fast at every location.

Nevertheless there’s a difference between aws.eu-central-1 and aws-us-east-1. In both datacenters rubygems.org is available with ~ 1ms latency. But, at least currently, I am not hit by ratelimits in us-east-1, but in eu-central-1.

I had this issue when trying to do a web_only install. So I went back to try a standard install and the first thing it wanted me to do was increase the swap file. I did that, re-ran the install and it seems to have fixed it.