Space issues, recent

Is it my imagination or is there an epidemic of “running out of space” problems lately?

I can’t remember for certain, but I think the 30 minute install used to mention minimum disk space 8 G.

What is the absolute minimum for an instance with OS, Docker etc, the running docker images, 1 backup, retention 1 backup, and enough left over to do ./launcher cleanup, then rebuild app ?

Probably worth mentioning in the 30 min install.

This is expected, we recently forced everyone on a new image.

@Falco we should perhaps add to your list to have rebuild offer to do a cleanup if you are close to the edge.

9 лайков

https://github.com/discourse/discourse_docker/pull/357

I went with this approach:

On rebuild or bootstrap if the user has less than 5GB on the /var/lib/docker path, we print a warning and exit.

7 лайков

Pretty sure we had this check before (in discourse-setup script), but maybe not on rebuild?

I remember @sam was very unhappy about the idea that any setup checks would happen in launcher.. is this space check OK there @sam?

4 лайка

5GB should be enough headroom for the update, at least for a while. I would suggest warn and exit if less than that is fine, but I think it might make sense to get the size of the last backup, and if (after the update) there won’t be enough space for the next backup, then at least warn, or better yet give them the choice.

That way they are aware that they have to do something about space before it becomes a show stopper. At the moment some of the support questions are urgent because the forum stops working. Warning the admin that they’re about to ring the bell may make them be a bit more proactive.

Cool. I just made the script use the correct docker storage path, when a user customize it.

I think this should be an warning in the app, possibly an extension to this.

5 лайков

That would be fine. We’re talking about the difference between Discourse warning you that your instance might stop working soon, and it just informing you that it has already stopped working (in the CLI) or failing to update via the GUI.

Warnings are less stressful than a broken installation (for the admin) and if they include a link to some basic triage then admins who don’t ignore the warnings may be able to resolve the issue themselves, rather than posting here on meta with “My instance is broken, what do I do?”

Some rough idea of the RAM footprint (over time) of the instance would be great, down at the bottom of /admin where it shows space. The way I see it there are a lot of support topics which resolve down to RAM and disk space problems - warnings might reduce how often people need support.

1 лайк
root@test:/var/discourse# ./launcher rebuild app
На диске осталось менее 5 ГБ свободного места. Для продолжения потребуется больше места.

Хотите попытаться освободить место, очистив образы и контейнеры Docker в системе? (y/N)y
ВНИМАНИЕ! Будут удалены:
        - все остановленные контейнеры
        - все тома, не используемые хотя бы одним контейнером
        - все сети, не используемые хотя бы одним контейнером
        - все висящие образы
Вы уверены, что хотите продолжить? [y/N] y
Удалённые образы:
deleted: sha256:819eeb6f03508bc5bc3513b1c3ad15676f89eca0aad3e9cd5aee91814232c659
deleted: sha256:ee29540380f982c413b738107117efd9ea47ccbf7a734a4a6b599f6fadf48d80
deleted: sha256:8fa33f3175ab8c85b934f5de02b23d3b4f006e947a63c7b2e8ed9f00b4120784
deleted: sha256:4dc0122075eb31044391c92fbfe3427faa6247b87b62d9872e94072891776de1
deleted: sha256:9b2efd6b6ef11f51e7109b006e852d5a672db6b48a5a7e38f9f1a0ade1abc772
deleted: sha256:24f0df43021665bd15bf59945554929c0cea86e21828de355a4154d707bdee9b

Всего освобождено места: 2,651 ГБ
Если очистка прошла успешно, вы можете попробовать снова.
root@test:/var/discourse#

Это выполняется с помощью новой команды очистки Docker, и она будет работать даже если у вас доступно 0 байт. Мы также пытаемся определить правильную папку для освобождения места.

Если это вызовет у вас проблемы, пожалуйста, создайте тему в разделе Contribute > Bug, и помните, что вы всегда можете пропустить эту проверку с помощью флага --skip-prereqs.

3 лайка