this post was submitted on 05 Sep 2023
16 points (100.0% liked)
Announcements
242 readers
1 users here now
Announcements about system updates or other things related to this instance.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks for fixing, I was wondering WTF was going on because this instance hasn't had any unexpected downtime since I joined!
I don't know much about how Lemmy works under the hood, I really need to spend some time looking at it, but isn't it possible to set a cron job to check the available free disk and then do a cache purge of the oldest X days of cached images if needed?
Edit: Since I asked the question I took 90 seconds to look and it appears that it possible to make pictrs do this.
Yeah it was the first downtime we have had since we started! :)
I think it's an excellent idea to make it purge the oldest X days of cached images. I will look at your link and see what I can do. Thank you!
I have been reading up on pict-rs and it seems that the environment variable
PICTRS__MEDIA__RETENTION__PROXY
is the one to set for cleaning up old cached images.It seems they added this environment variable in
pict-rs
version 0.4.2 so I bumped our pict-rs version from 0.4.0 to 0.4.2 and applied the environment variable now.Hopefully this will take care of the disk space growing on its own, but will keep an eye on it. :)
I found a problem. It removes Avatar & Banner pictures from your profile!
I noticed this also. Since all pictures are handled by pict rs, deleting anything from disk risks removing any picture users have uploaded also.
Interesting design choice of Lemmy to keep both cached images and user images in the same place with the same names... They all look the same on disk with generated names.
I noticed today that community pics are gone also.
Try to upload the same images again and if that doesn't work, try to create new images to replace them. I will also try tomorrow to look into this more...
Awesome! Hopefully it works!