Stalled upgrade when using "Memory Ballooning"

(Phillip Schichtel) #1

Me again and I have basically the same stalled upgrade problem, but instead of beta4->5 I’m now at beta6->7. Instead of hanging later in the upgrade process it seems like it didn’t even start the upgrade, as the console never showed any progress.
I haven’t tried rebuilding the app yet, but I doubt that should be necessary on every upgrade or is that something to expect when running beta versions?

(Phillip Schichtel) #2

I rebuilt the container now which successfully upgraded Discourse, but the Upgrade page is still telling me “Currently upgrading…”

I guess it’s safe to reset the upgrade in this case.

EDIT: After resetting the upgrade I could upgrade again (even though there were no changes) and that upgrade went ok.

(Sam Saffron) #3

I recommend you rebuild your container.

cd /var/discourse
git pull
./launcher rebuild app

(Phillip Schichtel) #4

I did:

The question was:

(Mittineague) #5

I think it depends on more than one thing.

How much is being queued up?
Does your set up accommodate spikes in memory and processing demand gracefully?

(Phillip Schichtel) #6

As stated in my previous topic I did many updates since the 1.3 betas. I usually updated as soon as the notification email arrived and never had an issue until these 2 upgrades. So I doubt it has anything to do with the server, even though it just has 512M-1G memory (+swap) and a single core. The Discourse instance doesn’t see a lot of traffic (10 unique visitors a day at max).

(Mittineague) #7

I don’t know without looking, but isn’t the recommended minimum 2G?

What may be OK for “normal” use is not the same as what might be needed for more resource intensive operations.

(Jeff Atwood) #8

The minimum is 1GB RAM. Why do you say “my server has between 512MB and 1GB of memory?” Is the amount of RAM determined dynamically? You need 1 GB RAM minimum for Discourse. Anything less is not supported for production sites.

(Phillip Schichtel) #9

it uses memory ballooning, so it will have 1G if it needs it and there is spare memory on the host (there is plenty at the moment). The system basically has 1G. I’m running this setup as said before since the early 1.3 betas without issues, so I guess something must have changed in one of the betas since 1.4.0beta5. If it is not enough RAM anymore, then the documentation should be changed to reflect that. Or maybe it’s not a RAM problem, but something else. This upgrade stalled before it even started doing anything, so I kinda doubt it is a RAM problem.

(Kane York) #10

This is bad, because upgrades will blow up under these conditions, or any memory pressure at all on the host. Which is exactly what you just saw.

You should change it to 1G ←→ 2G.

(Phillip Schichtel) #11

Currently this is a standalone instance including the postgres database. Would moving the PG db to another system help much? I’m currently wondering what Discourse is using all that RAM for. Is it overhead from Ruby/Rails? Or caching? I wonder, because I think 1G is quite a lot for basically… text. If there is already some documentation about this I’d be really happy about a link to that

(Jeff Atwood) #12

If you would prefer lower memory requirements, perhaps you should choose another forum solution. 1GB is the minimum.

(Phillip Schichtel) #13

I’m not asking for lower requirements, I’m honestly just wondering where the requirements come from.

(Jeff Atwood) #14

See What exactly is holding Discourse from being OK with 512mb RAM?

(Phillip Schichtel) #15

Thanks for the Link, so it boils down to runtime overhead. I guess moving the database to a different box will probably help with running Discourse with just 1G.