I have a small Discourse instance on a server with 25GB of space. Presently it only has 3.4 GB free, and I’m not sure why. This is preventing me from running updates.
There are no services running on this instance besides Discourse, nor have there ever been
So far to free up space I’ve:
deleted every log I could find both from Discourse and from /var/log/journal
deleted all but one of my Discourse backups
pruned all old docker images
ran apt-get autoclean and apt-get autoremove
ensured I didn’t have old kernals
I considered moving my postgres data to an external drive, but it’s less then a GB right now so I don’t think that will help enough.
/dev/vda1 is using 20 GB of space.
Is there anything else I can do? Is 25GB no longer a reasonable amount of disc space to run Discourse on?
It depends on mostly your uploads but also backups and postgres if your site is very large (which it sounds like is not the problem). How large are your uploads? The admin dashboard should say at the bottom.
It’s less then 50MB, this isn’t a big or old instance at all. As I mentioned, I considered moving it off the main drive but I don’t think that’s the major issue here.
If your uploads are ~25MB and your postgres is ~1GB I would suspect that Discourse is making backups you don’t need. I would check your backup retention settings (Admin > Settings > Backups) and look at your current backups (Admin > Backups) and delete any you don’t need.
Nevermind. Would help if I remembered you already cleared them.
You can check what’s using the space in the common places:
du -sh /shared/*
du -sh /var/www/discourse/*
du -sh /var/www/discourse/public/*
The biggest use of space in the file system are /var/lib/containerd/io.containerd.content.v1.content at 2.4 GB and /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs at a whooping 12 GB
Sorry, forgot to mention you needed to be in the container. The file you mentioned is from Docker. You can check what it’s being used by with docker system df and do a global prune with docker system prune if required, just make sure Discourse is running when you do so.
In the container, the only thing is larger then a GB is /var/www/discourse/vendor/bundle/ruby/ at 2.1 GB
I will add if I prune the image the update pulls, I have enough space, but when I attempt to update and it pulls it again, I lose it. So almost 5GB of space is the new image.
Indeed, please show all your outputs. I wouldn’t recommend looking around inside the container - your problem is at system level, and that’s where to start looking. And don’t look where you think there might be a problem, but look at the whole picture.
First, reboot. You want a clean filesystem and a fresh system.
Next, see this previous thread for detailed advice: