Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Prune old remote posts completely #1919

Open
gw1urf opened this issue Jun 22, 2023 · 5 comments
Open

[feature] Prune old remote posts completely #1919

gw1urf opened this issue Jun 22, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@gw1urf
Copy link

gw1urf commented Jun 22, 2023

Is your feature request related to a problem ?

Disk usage of database grows without bound, filling up with statuses that are unlikely ever to be revisited.

Describe the solution you'd like.

It would be nice to be able to set a time after which remotely originated posts will be completely deleted from the database (along with any media) if they've had no local interactions (likes, boosts, comments).

Describe alternatives you've considered.

NONE

Additional context.

I've been running a single user instance for ~8 months. The media pruning works great, but my SQLite database is now > 2GBytes and becoming one of the biggest things on my VPS. The "statuses" table has nearly 700,000 entries.

It seems to me that if a remote status has never had a comment, boost, bookmark or like by any local account, it could be pruned from the database after a sensible time. I'm unlikely ever to scroll back even 2 weeks through my timeline, so if the items I never interacted with disappeared, I wouldn't notice.

@gw1urf gw1urf added the enhancement New feature or request label Jun 22, 2023
@tsmethurst tsmethurst changed the title Prune old remote posts completely [feature] Prune old remote posts completely Jun 22, 2023
@tsmethurst
Copy link
Contributor

related: #1442

@xmgz
Copy link

xmgz commented Aug 31, 2023

yes some kind of purge/autoclean setting for both local and remote content would be nice to have as an opt in feature so anybody could decide what's best for their instance.

Posts without external interactions older than $TIME would be a nice first implementation. Both DB and Multimedia folder size (important for small VPS) would benefit.

thank you

(reached here because I need to prune old Multimedia safely, but I don't want to mess with DB problems)

@NyaaaWhatsUpDoc
Copy link
Member

@xmgz pruning of old statuses (and possibly, accounts) is planned for some point in the future. though media can already pruned, there's an admin action for it you can access through the front-end settings UI, a CLI command, and an operation that runs for it every night with a configurable max. number of days worth of remote media to cache.

@xmgz
Copy link

xmgz commented Aug 31, 2023

thank you @NyaaaWhatsUpDoc 👍

yes, I have configured that option, very useful. It was my fault as I did not read that this issue was related to remote content. My comment is related to own posts, a feature similar to mastodon et al. to delete old posts from users in the gotosocial server.

Please excuse, I'll try better.

@tsmethurst
Copy link
Contributor

This is the 'delete my own posts' version of the issue :) #1442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants