this post was submitted on 14 Jul 2023
49 points (98.0% liked)

Lemmy Support

4634 readers
14 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

hello, on my server on which only Lemmy is running, I don't understand why it fills up space all the time. Every day it increases by about 1GB thus risking reaching the limit after a short time.

It is not the images' fault because there is a size limit for uploading and they are also transformed into .webp.

The docker-compose file is the one from Ansible 0.18.2 with the limits for loggin already in it (max-size 50m, max-file 4).

What could it be? Is there anything in particular that I can check?

Thanks!

28% - 40G (3 July)
29% - 42G (4 July)
30% - 43G (5 July)
31% - 44G (6 July)
36% - 51G (10 July)
37% - 52G (11 July)
37% - 53G (12 July)
39% - 55G (13 July)
39% - 56G (14 July)
top 20 comments
sorted by: hot top controversial new old
[–] hitagi@ani.social 26 points 1 year ago (3 children)

Might want to check out this issue. Honestly, I'm not sure what exactly the activity table consists of or what it does but it's been eating through everyone's disk space pretty fast.

[–] skariko@lemmy.ml 13 points 1 year ago* (last edited 1 year ago)

well, indeed it could be just that. I just checked and it's size is 15GB 😱

[–] muddybulldog@mylemmy.win 6 points 1 year ago

The activity table is every message that is sent or received between your instance and the rest of the fediverse; posts, comments, votes, admin actions, etc.

[–] FuzzChef@feddit.de 3 points 1 year ago (1 children)

Extra config options always result in more complexity, so I would strongly prefer to change the hardcoded pruning interval instead.

Why would that be the case?

[–] hitagi@ani.social 3 points 1 year ago

I'm not too sure as well. Most people running their own Lemmy instance probably want more config options to fit their needs. I like how much I can configure with pictrs straight from the docker compose file for example.

[–] gravitas_deficiency@sh.itjust.works 11 points 1 year ago (1 children)

It warms my heart to see lemmy instance owners learning about the nuances of db administration 🥰

[–] DrManhattan@lemmy.design 7 points 1 year ago (1 children)

I don’t think you should be enjoying the fact that there are some problems that could realistically cause a large portion of Lemmy instances to become unsustainable. We should be working towards a way that we can ensure the Lemmy ecosystem thrives.

[–] gravitas_deficiency@sh.itjust.works 13 points 1 year ago* (last edited 1 year ago)

I mean… it was kind of a joke. At the same time, if someone is hosting a database on their own hardware, it is important to understand when and how the database actually releases disk.

That said, I completely agree that this is an issue that does need to be addressed.

[–] Wander@yiffit.net 6 points 1 year ago (1 children)

You can delete old entries from the table. The space will not be released to the filesystem automatically though, but you won't have to worry about it until enough days pass where it's filled up the same amount that was freed.

[–] GlitchyDigiBun@lemmy.dbzer0.com 4 points 1 year ago (1 children)

Im sure it couldn't be difficult to do a rolling purge to keep the file at a fixed size?

[–] helios@social.ggbox.fr 3 points 1 year ago (1 children)

If you need the space back on the filesystem, you could rebuild the table with VACUUM FULL. Do note that the table would be unavailable during that process as it would be locked exclusively. https://www.postgresql.org/docs/current/sql-vacuum.html

[–] Wander@yiffit.net 2 points 1 year ago (1 children)

You'd need to take your site down for a while since write access is necessary to that table to avoid duplicates. But yeah, once you've done a vacuum full you could find a way to each day trim old entries.

[–] johntash@eviltoast.org 1 points 1 year ago (1 children)

Entries older than 6 months are deleted by default, but as far as I understand it might be safe to manually delete them sooner than that?

[–] SeeJayEmm@lemmy.procrastinati.org 2 points 1 year ago (1 children)

I'm purging much more aggressively than that an so far so good.

[–] johntash@eviltoast.org 2 points 1 year ago

Good to know, thanks! I have space to spare, but I'll probably make it more aggressive to save on backup size

[–] chiisana@lemmy.chiisana.net 4 points 1 year ago (2 children)

Bearing in mind that posts and comments from communities your users are subscribed to will flow into your instance, not as a reference, but as a copy. So all those “seeding” scripts are terrible ideas in bringing in content you don’t care about and filling up space for the heck of it. If you’re hosting a private instance, you can unsubscribe from things that won’t interest you, thereby slow down the accumulation of contents that are irrelevant and just wasting space.

[–] skariko@lemmy.ml 2 points 1 year ago (2 children)

Yes I had considered that, but considering that ours is not a giant but moderate instance (a thousand subscribers) it seemed exaggerated to get to have 1GB occupied every day.

load more comments (2 replies)

Not to mention the added load to all the servers that are sending you crap you don't even look at.

[–] fubo@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

Back in the early 2000s, Usenet servers could store posts in a fixed-size database with the oldest posts expiring as new posts came in. This approach would mean that you can't index everything forever, but it does allow you to provide your users with current posts without having infinite storage space.

[–] fubo@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

Back in the early 2000s, Usenet servers could store posts in a fixed-size database with the oldest posts expiring as new posts came in. This approach would mean that you can't index everything forever, but it does allow you to provide your users with current posts without having infinite storage space.

load more comments
view more: next ›