# Bootstrap Failed, out of memory error

**URL:** https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800
**Category:** Self-hosting
**Created:** [5월 14, 2015, 4:04오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800 "2015-05-14T04:04:02Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 4:04오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/1 "2015-05-14T04:04:03Z")

</div>

I tried searching through the forum for troubleshooting but couldn’t find a similar error code that other people have encountered. Would someone shed light on what I have done wrong?

```
FAILED
--------------------
RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return # <Process::Status: pid 318 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105: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'"]} 6a33a6d3658bf0bcba03364c855763ff6213a357b8190077daa6ddf9a9335bc1
FAILED TO BOOTSTRAP

```

I followed the standard installation procedure.  
Many thanks in advance!

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [5월 14, 2015, 4:11오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/2 "2015-05-14T04:11:28Z")

</div>

If you have the adsense plugin installed, please read this  
[https://meta.discourse.org/t/upgrade-failed-due-to-adsense-plugin/28671](https://meta.discourse.org/t/upgrade-failed-due-to-adsense-plugin/28671)

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 4:30오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/3 "2015-05-14T04:30:22Z")

</div>

Thanks @Mittineague. Where can I find the AdSense file? Sorry I am new to coding.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [5월 14, 2015, 4:41오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/4 "2015-05-14T04:41:07Z")

</div>

In the “plugins” folder

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2015, 4:44오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/5 "2015-05-14T04:44:46Z")

</div>

Can you clarify, are you installing for the first time? Did you follow our [official install](https://meta.discourse.org/t/142537?silent=true) guide?

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 4:46오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/6 "2015-05-14T04:46:58Z")

</div>

But I have never downloaded the file? Am I supposed to do it in Terminal?

Yes I am installing it the first time. Yes I followed your [official install](https://meta.discourse.org/t/142537?silent=true) guide.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2015, 4:48오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/7 "2015-05-14T04:48:07Z")

</div>

The most common error is bad formatting in the app.yml file. I suggest going back and making sure every single character is correct, including the correct number of spaces in front of each line.

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 4:55오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/8 "2015-05-14T04:55:36Z")

</div>

I replaced “example” with my own email and site credential and deleted the “#” in front of the line, where “#” exist for the line I made changes in. Are there other spacing rules that I might not be aware of?

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 5:03오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/9 "2015-05-14T05:03:46Z")

</div>

```
 LANG: en_US.UTF-8
 # DISCOURSE_DEFAULT_LOCALE: en

 ## TODO: How many concurrent web requests are supported?
 ## With 2GB we recommend 3-4 workers, with 1GB only 2
 #UNICORN_WORKERS: 2

 ## TODO: List of comma delimited emails that will be made admin and developer
 ## on initial signup example 'user1@example.com,user2@example.com'
 DISCOURSE_DEVELOPER_EMAILS: 'xxx@xxxxx.com'

 ## TODO: The domain name this Discourse instance will respond to
 DISCOURSE_HOSTNAME: 'xxx.xxxxxxx.com'

 ## TODO: The mailserver this Discourse instance will use
 DISCOURSE_SMTP_ADDRESS: smtp.mandrillapp.com # (mandatory)
 DISCOURSE_SMTP_PORT: 587 # (optional)
 DISCOURSE_SMTP_USER_NAME: xxxxxxx@xxxx.com # (optional)
 DISCOURSE_SMTP_PASSWORD: xxxxxxxx # (optional)
 #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

 ## The CDN address for this Discourse instance (configured to pull)
 #DISCOURSE_CDN_URL: //discourse-cdn.example.com

```

Here are my configurations (I x-ed out my credentials). I gather that everything is aligned?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2015, 5:26오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/10 "2015-05-14T05:26:51Z")

</div>

I suggest pasting the entire app.yml file in an online YAML validator like

> **[YAMLlint - The YAML Validator](https://www.yamllint.com/)**
>
> Validate, Verify and Reformat your YAML documents, optimized for Ruby on Rails

If you are doing a simple install that’s the first thing to verify.

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 5:31오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/11 "2015-05-14T05:31:27Z")

</div>

YAMLlint says it is a valid YAML. What else could be the problem? 😕

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2015, 5:33오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/12 "2015-05-14T05:33:13Z")

</div>

Not sure we would need the complete install log, the error is usually upstream. Did you add any extra steps or deviate from our install guide in any way?

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 5:34오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/13 "2015-05-14T05:34:47Z")

</div>

No. The only thing I skipped was setting up Swap.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2015, 5:37오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/14 "2015-05-14T05:37:07Z")

</div>

Swap is needed for 1 GB RAM, but can be optional for 2 GB. Maybe attach a text file of the complete install log here.

I install from the guide multiple times per week and I have no issues. But I install _religiously_ following the guide to the letter every step of the way.

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 5:53오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/15 "2015-05-14T05:53:16Z")

</div>

I tried the installation for the 3rd time but it is still not working. Here is the install log. Thanks a lot!  
[Discourse Installation 3.txt](https://global.discourse-cdn.com/meta/original/3X/1/6/16f412eeb283b7df6b4bd2bc62b869d3bf9f345b.txt) (216.8 KB)

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [5월 14, 2015, 8:19오전 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/19 "2015-05-14T08:19:35Z")

</div>

I followed the guide that @Qasem_h posted and it now works! Not sure if the extra step I took to update and upgrade the system had made a difference. Thanks a lot everyone!

[https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-ubuntu-14-04](https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-ubuntu-14-04)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2015, 7:50오후 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/20 "2015-05-14T19:50:25Z")

</div>

Looking at your logs, you hit an out of memory error. So not following the guide and setting up a swap file is what caused the problem.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 14, 2015, 7:50오후 UTC](https://meta.discourse.org/t/bootstrap-failed-out-of-memory-error/28800/21 "2015-05-14T19:50:48Z")

</div>


