Bootstrap Failed, out of memory error


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?

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

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

(Mittineague) #2

If you have the adsense plugin installed, please read this


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

(Mittineague) #4

In the “plugins” folder

(Jeff Atwood) #5

Can you clarify, are you installing for the first time? Did you follow our official install guide?


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 guide.

(Jeff Atwood) #7

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.


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?

 LANG: en_US.UTF-8

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

 ## TODO: List of comma delimited emails that will be made admin and developer
 ## on initial signup example ','

 ## TODO: The domain name this Discourse instance will respond to

 ## TODO: The mailserver this Discourse instance will use
 DISCOURSE_SMTP_ADDRESS:         # (mandatory)
 DISCOURSE_SMTP_PORT: 587                        # (optional)
 DISCOURSE_SMTP_USER_NAME:      # (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)

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

(Jeff Atwood) #10

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

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


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

(Jeff Atwood) #12

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?


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

(Jeff Atwood) #14

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.


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 (216.8 KB)


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!

(Jeff Atwood) #20

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.

(Jeff Atwood) #21