Stuck in a loop of freeing up space and filling it up again when rebuilding

How did that happen?

From my side, I can say that I started an update via /admin/upgrade which failed, presumably due to a lack of space. Since the website was down, I tried to rebuild via ssh and that’s when the whole misery started…

Regardless of this specific situation, I wonder if the web-updater could not handle lack of disk space better. Rather than crashing the site, could it not just exit before it’s too late?

Because you hadn’t upgraded the data container.

It could probably do a disk space check before it started, and refuse to proceed if there wasn’t enough space.


Another question:

Where did you get these IDs from:

Those are the container IDs (first column in the docker ps output).


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

I still don’t quite understand this. If I’m supposed to upgrade the data conatainer too, why doesn’t it appear in these instructions?

And isn’t the whole point of the two container setup that I don’t have to rebuild the data container? Well, I guess, not, but if someone could help me understand what the proper procedure for a two container setup is when /admin/upgrade/ tells me to do

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

Hence the command you quoted is talking about the web_only container… not the data container.

2 container setup is not something we detect in the web upgrader. The commands you want to run are exactly the ones you quoted…

1 Like

It’s assumed that if you can set up a two container install that you can figure out the nuances. Usually you just do the bootstrap/destroy/start sequence.

Database upgrades don’t happen often and they are typically not required when they are first available. They are sometimes required. When they are you can just do a rebuild on the data container. (twice for the last upgrade)


Yet, things went wrong because I did exactly that:

So I guess this was a situation where a database upgrade was required.

Bur how do I know whether a database upgrade is required?

You see what version of the database you’re running and look at the database templates to see what version they are upgrading to.

One way to see what version you’re running is

./launcher enter data 
psql --version 

There are a bunch of topics about the last database upgrade, about 6 months ago (but it might have been 3 or 9). As much as I see you here in surprised you missed it!

And if disk space is a problem then the database upgrade will be challenging because you need at least 2x free space since you’ll be making another copy of the database to upgrade it.


Haha, well, I may have missed it or I may have seen it and scrolled past it because I had no reason to be interested in this kind of low level stuff. Database? It’s like the road when driving a car: you don’t really think about it until it gets bad.

It even took me a while to find what you (probably) where referring to now:

But on the way, I found this useful specification of what “not often” means:

To summary my lesson from this topic:

The confusion around the original issue was due to a combination of rather rare circumstances which meant that all standard instructions failed for various reasons:

  1. two-container setup
  2. need for (rare) database upgrade (which requires more disc space than other upgrades)
  3. only 20 GB SSD

Points 1 and 3 are still true but probably not nr. 2. Yet, I still had problems doing the web_only upgrade. So the db upgrade probably worsened things but it seems it was a mistake to run the two-container setup on 20GB.

That seems true. I won’t do it with less than a 2GB-50GB-$10/month Digital Ocean droplet. But it’s hard to get by on 20GB SSD at all. And unless this is your Discourse for your family who you can’t convince to use Discourse to use Discourse at all (maybe I’m projecting), even 25GB is tough.

Glad you got it sorted (you did, right?)

1 Like