# Update failing due to rate limiting by RubyGems

**URL:** https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636
**Category:** Support
**Created:** [2017 年6 月 16 日 21:32 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636 "2017-06-16T21:32:40Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 21:32 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/1 "2017-06-16T21:32:40Z")

</div>

Hello. I wanted to update my discourse for new commits, it did fail. Then I rebuild app, it also failed with the following error. Any Idea?

```
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 13406 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
1202bf591b3bb66f4bb14db9ffd2761171eaaece447b8e3c00051fd4866d511c
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [2017 年6 月 16 日 21:35 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/2 "2017-06-16T21:35:10Z")

</div>

What’s the actual error? “please scroll up and look for earlier error messages”

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 21:40 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/3 "2017-06-16T21:40:43Z")

</div>

I dont know its a lot of text. I searched for “error” and these are the lines I got:

```
HTTP 429 Too Many Requests https://index.rubygems.org/info/sprockets-rails
Bundler::HTTPError: Net::HTTPTooManyRequests: <html>
<head><title>429 Too Many Requests</title></head>

I, [2017-06-16T21:36:48.032740 #14] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
Gem::MissingSpecError: Could not find 'http-cookie' (~> 1.0) among 248 total gem(s)
Checked in 'GEM_PATH=/var/www/discourse/vendor/bundle/ruby/2.4.0', execute `gem env` for more information

```

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [2017 年6 月 16 日 21:50 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/4 "2017-06-16T21:50:16Z")

</div>

You’re getting throttled by rubygems. Are you running on AWS? What does your pups template look like?

Read more here: [RubyGems.org API - RubyGems Guides](http://guides.rubygems.org/rubygems-org-api/#rate-limits)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017 年6 月 16 日 21:51 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/5 "2017-06-16T21:51:45Z")

</div>

> [@hnaseri](#):
>
> HTTP 429 Too Many Requests [https://index.rubygems.org/info/sprockets-rails](https://index.rubygems.org/info/sprockets-rails)  
> Bundler::HTTPError: Net::HTTPTooManyRequests: \<html\>  
> \<head\>\<title\>429 Too Many Requests\</title\>\</head\>

I got this rebuilding last week. I commented out a plugin. I built again. It worked. Then I couldn’t figure out why that plugin could have caused a problem, put it back in, rebuilt, and it worked. I had prepared a ~~bug report~~ plea for help, but since the problem went away, I never posted it.

There have been a handful of these “too many requests” errors from rubygems lately. I can’t make sense of them.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 21:56 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/6 "2017-06-16T21:56:17Z")

</div>

No. I’m not on AWS. I have a local server. [quote=“robbyoconnor, post:4, topic:64636”]  
What does your pups template look like?  
[/quote]

I don’t know what is pups template. could you explain?

> [@pfaffman](#):
>
> I commented out a plugin. I built again. It worked.

So I commented out two plugins but it didn’t help. now I commented even more. Hope it would work this time.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 22:03 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/7 "2017-06-16T22:03:44Z")

</div>

Now I’m getting this error 😕

```
Removing old container
+ /usr/bin/docker rm app
Error response from daemon: Driver overlay failed to remove root filesystem abd13a925ecc025fb672e6ee0e594758f846f3ed393a8f647bb6cf1cf970fa6b: remove /var/lib/docker/overlay/d6866837ea0650d91bb09d012158ca82276cecc6d2c1c332d31e18c0651845dc/merged: device or resource busy

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: Container is marked for removal and cannot be started.
Error: failed to start containers: app

```

what is this?

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 22:20 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/8 "2017-06-16T22:20:52Z")

</div>

I rebooted my server as the last resort 😂 and rebuild app and now it was rebuilded without error.

Then I added the plugins I’ve removed, However I got the same error I reported earlier again. So could it be one of the plugins that causes error?

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [2017 年6 月 16 日 22:26 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/9 "2017-06-16T22:26:30Z")

</div>

> [@hnaseri](#):
>
> I rebooted my server as the last resort 😂 and rebuild app and now it was rebuilded without error.
> 
> Then I added the plugins I’ve removed, However I got the same error I reported earlier again. So could it be one of the plugins that causes error?

I’m not sure why it would…somehow you’re hitting the rubygems rate limit threshold.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 22:29 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/10 "2017-06-16T22:29:08Z")

</div>

Is there any thing I could do to find the culprit?

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [2017 年6 月 16 日 22:29 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/11 "2017-06-16T22:29:22Z")

</div>

> [@pfaffman](#):
>
> I got this rebuilding last week. I commented out a plugin. I built again. It worked. Then I couldn’t figure out why that plugin could have caused a problem, put it back in, rebuilt, and it worked. I had prepared a bug report plea for help, but since the problem went away, I never posted it.
> 
> There have been a handful of these “too many requests” errors from rubygems lately. I can’t make sense of them.

I’m not entirely sure – but what are you hosted?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017 年6 月 16 日 22:30 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/12 "2017-06-16T22:30:32Z")

</div>

Digital Ocean. At about the same time, I did similar rebuilds at Digital Ocean (and I’m pretty sure, the same data center).

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [2017 年6 月 16 日 22:31 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/13 "2017-06-16T22:31:35Z")

</div>

> [@hnaseri](#):
>
> Is there any thing I could do to find the culprit?

I’m not entirely sure – A lot of people have had this issue – I’ve never encountered this issue…

> [@pfaffman](#):
>
> Digital Ocean. At about the same time, I did similar rebuilds at Digital Ocean (and I’m pretty sure, the same data center).

Odd…what plugin caused it? Look at its Gemfile maybe?

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 22:33 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/14 "2017-06-16T22:33:10Z")

</div>

> [@robbyoconnor](#):
>
> Odd…what plugin caused it? Look at its Gemfile maybe?

The plugins I removed that got it fixed with a server reboot was these:

```
      - git clone http://github.com/[Communiteq](https://www.communiteq.com) (formerly DiscourseHosting)/discourse-sitemap.git
      - git clone https://github.com/xfalcox/discourse-backups-to-dropbox.git

```

I added them back and it failed again.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017 年6 月 16 日 22:34 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/15 "2017-06-16T22:34:04Z")

</div>

Of those `discourse-sitemap` is the more likely culprit.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 22:36 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/16 "2017-06-16T22:36:48Z")

</div>

Ok so I remove this and add all others to see what happens. However I dont know why it is the culprit? It has not been updated for a long time.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017 年6 月 16 日 22:39 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/17 "2017-06-16T22:39:12Z")

</div>

Plugins get broken if Discourse gets updated in a way that breaks the plugin. The other plugin you listed is maintained by a team member, so it’s somewhat more likely he’ll notice something’s wrong before other people.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 22:43 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/18 "2017-06-16T22:43:17Z")

</div>

Nope. It failed again. So I’m removing backup to dropbox this time.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [2017 年6 月 16 日 22:44 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/19 "2017-06-16T22:44:55Z")

</div>

But even if it is a broken plugin, why it would trigger rubbygem threshold? Its not making sense.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017 年6 月 16 日 22:46 UTC](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636/20 "2017-06-16T22:46:46Z")

</div>

> [@hnaseri](#):
>
> But even if it is a broken plugin, why it would trigger rubbygem threshold? Its not making sense.

I couldn’t figure that out either. I suspect that it’s unrelated.

Are you still getting the rubygem error?

[Next page](https://meta.discourse.org/t/update-failing-due-to-rate-limiting-by-rubygems/64636.md?page=2)
