Less than 5GB of disk space, can't upgrade Discourse

Dear All,

I have an existing installation of discourse however i did not upgrade last few releases. Its hosted by digital ocean. This mornng when i tried to upgrade through manual, i am getting the following error. Please can you guide as what step i should take to upgrade this.

Cheers,
Muhammad

Run it again and say Yes. Your data won’t be touched, only old docker images will be removed.

1 « J'aime »

Thanks. I did that but it does not seem working. Please see this snapshot. Sorry I forgot to attach this earlier. Thanks in advance

use either du -sh * and drill down into the large directories or ncdu if you have that package available, and try to figure out where exactly your space has gone

if it is user content you will probably have to increase diskspace on your server, but a common problem on servers that run docker for a while is that the default json logging engine never rotates the logs

[root@discocent discourse]# cd /var/lib/docker/containers/
[root@discocent containers]# du -sh *
5.1M	86981cd18ab1d8e95e502bf08a1fdc949030cddc29079b53a8e17b2c6a98ba6f
36K	cecf3b8565bce6156c61f61b27af425d0f956b8ce439f2519300ebfdc7bb4cf9
[root@discocent containers]# cd 86981cd18ab1d8e95e502bf08a1fdc949030cddc29079b53a8e17b2c6a98ba6f/
[root@discocent 86981cd18ab1d8e95e502bf08a1fdc949030cddc29079b53a8e17b2c6a98ba6f]# ls -lh
total 5.1M
-rw-r-----. 1 root root 5.0M Jan 16 10:07 86981cd18ab1d8e95e502bf08a1fdc949030cddc29079b53a8e17b2c6a98ba6f-json.log

that’s 5M of log for my idle test instance after a couple days, an active server will be larger. if you run other containers they might be logging even more.

You can configure docker to handle log rotation, check out Configure logging drivers | Docker Documentation …not sure why it’s not the default.

1 « J'aime »

Hi @ssvenn

Many thanks. this is much appreciated. I have run the commands and i can see the following statistics. Would you mind to advise, how does this look like as I am unable to interpret I am afraid. Thanks in advance.

Sorry here is the lastest one please.

I have been surprised to see the occupied space. As we have very minimal activty on our forum. Thanks

ok, that’s not your problem then. Only one container and only 0.5MB of logs.

if you run du -sh * again in the / top directory maybe you will get a better picture of where the space has gone. I highly recommend ncdu to make it easier ( NCurses Disk Usage )

on my test instance docker uses about 8GB on images, check out Prune unused Docker objects | Docker Documentation for help on how to clean that up.

docker image prune -a usually frees up a lot of space for me, you might have to docker rm app to delete your old Discourse app container first. If you have lots of forum backups maybe you could download them to your local machine to free up some additional space.

another thing you should check is docker ps -a to see if you have any unexpected containers. Sometimes a failed rebuild will leave a dangling container that you have to remove manually.

[root@discocent /]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                  PORTS               NAMES
86981cd18ab1        da251a932851        "/bin/bash -c 'cp -r…"   4 days ago          Exited (0) 4 days ago                       festive_margulis
[root@discocent /]# docker rm festive_margulis
festive_margulis
[root@discocent /]# docker image prune -a
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y
Deleted Images:
deleted: sha256:da251a9328516f691f0fc3bcdd685e218fa075ae744766996a25b7fe0008b4fc
deleted: sha256:3adfc688f9c999f5f08caae668a722c273311c3f84da33161bf23184218fa74b
deleted: sha256:ea31cd77735ab3d86f3d8903425d4157320b7047a07da4555a4752614c6e5265
deleted: sha256:b375a11cf89e3f124f9151688c2952ef8ca45f5ab5f2bd0751ea3f617708df87
deleted: sha256:cce92fda689ab9033f0b8db214bc63edd1ae3e05831a0f3a9418976d7dc7ccdd
deleted: sha256:d22094bbd65447c59a42c580eaa3a44cee9cd855f00905f59409be21bcefc745
deleted: sha256:b8976847450013f3eb5e9a81a5778f73ed7bef67e6393049712ef17102b4b7b7
deleted: sha256:b8c891f0ffec910a12757d733b178e3f62d81dbbde2b31d3b754071c416108ed

Total reclaimed space: 2.33GB

Have you checked your backups? It’s quite easy for them to fill your disk.

2 « J'aime »

Salut @pfaffman Petite question à ce sujet. J’ai rencontré le même problème, j’ai donc exécuté du -sh *. Aucun fichier ne dépasse 1 Mo.

Je n’ai donc rien supprimé.

mais j’ai essayé docker image “prune -a”, espace récupéré : 0 octet.

Dois-je faire autre chose ?
Mon problème est lié à la dernière mise à niveau que j’ai effectuée et qui a entraîné l’arrêt de l’application.

Avez-vous vérifié /var/discourse/shared/standalone/backups/default ? C’est le coupable le plus probable.

Je travaille sur un nouveau produit sur https://www.pfaffmanager.com/. Si vous vous connectez là, cliquez sur le bouton liste des serveurs en haut, puis sur le bouton Gratuit ! Gérer le serveur existant, puis configurez-le pour votre serveur comme il le suggère (je l’espère), je trouverai la solution pour vous.

2 « J'aime »

Merci, oui j’ai vérifié les sauvegardes. Total 5 fichiers * 16M. C’est petit, n’est-ce pas ?

J’ai aussi exécuté ceci


==================== INFORMATIONS MÉMOIRE ====================
RAM (Mo) : 1002

              total        used        free      shared  buff/cache   available
Mem:            978         692          68          33         216         110
Swap:          2047         242        1805

==================== VÉRIFICATION ESPACE DISQUE ====================
---------- Espace disque du système d'exploitation ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       12G   11G  848M  93% /

---------- Espace disque du conteneur ----------
Filesystem      Size  Used Avail Use% Mounted on
overlay          12G   11G  848M  93% /
/dev/xvda1       12G   11G  848M  93% /shared
/dev/xvda1       12G   11G  848M  93% /var/log


J’essaie votre suggestion maintenant le nouveau produit.

Oh. Vous n’avez que 12 Go. Ce n’est pas suffisant. Je recommande un minimum de 25 Go, mais idéalement 50 Go.

1 « J'aime »

Ok compris. Il y a quelques minutes, j’ai augmenté le volume à 30, peut-être qu’il est encore en cours d’optimisation
image

Au fait, je suis confus par l’interface utilisateur de votre produit, mais j’ai aussi soudainement été intéressé par la façon dont vous allez déboguer à partir de là. hahaha. Je vous envoie un message privé pour éviter de enfreindre les règles ici.

2 « J'aime »