Out of Memory error while upgrading Discourse

(Siraj Mahmood) #1

During discourse upgrading getting an error “Sorry, there was an error upgrading Discourse. Please check the logs below.” Please see the below screenshot of this error.

Please help me to resolve this issue.
Thank you!

(Felix Freiberger) #2

You’re out of memory. How much RAM do you have? Did you set up swap?

(Siraj Mahmood) #3

Yes I was setup during discourse installation, Using 1 GB Ram. We are using digital ocean $10/month plan, which is recommended.

(Tom Newsom) #4

Unless there’s some new magic I don’t know about, on a 1GB machine you need to SSH in and do

git pull
./launcher rebuild app```

(Felix Freiberger) #5

Can you share an output of free -m?

(Siraj Mahmood) #6

How can i see this output free -m?

(Felix Freiberger) #7

SSH into your server, run the command there, and copy & paste or share a screenshot of the output.

(Tom Newsom) #8

Go to digitalocean.com and log in
Go to your droplet
Click Access
Click Console Access
Type root and press enter
Type your password (you will have created this up during DO setup) and press enter

Now you can enter the above commands, including free -m

(Siraj Mahmood) #9

Now my problem is solved after run ./launcher rebuild app command.

Now everything is up to date. Otherwise going to share an output of free-m screenshot below.

Let me know, if everything is fine or not in this above snapshot. :slight_smile:

(Jeff Atwood) #10

Yes, looks good. Later versions of Discourse seem to exert even more memory pressure on upgrade, @sam I am not sure if there is anything we can do about this, but 2GB swapfile may need to be the minimum now.