What happened
Database became too big and it was constantly timing out, causing Pleroma to completely shit itself
How I fixed itFirst I set a cron job to restart Pleroma service every hour to avoid too much downtime untill I figure out what to do. Then I decided to do the most obvious thing which was to migrate the database to a more powerful machine. First backup didn't restore properly for whatever reason (I'm pretty sure it was because the old db server is Potgres 12 and the new one is Postgres 14 and I didn't use --quote-all-identifiers but someone else is gonna say there's no way that was the issue. Who cares, it works now). Then I ran sudo -Hu postgres vacuumdb --all --analyze-in-stages as recommended by Pleroma maintainers and it seems to be working now.
What nextI'm running Pleroma 2.4.3 and a few people told me there's a significant performance improvement in 2.5.0 so that's the next thing I'm going to do (have to be careful with that because Pleroma's built in updater can brick the whole thing if you look at it the wrong way, talking from experience)
Thank you for using ShitPissCum Services