plex really likes to shit its bed...

I am looking through the plex directory and Plex does not clean up after itself very well

everything is bloated with files, logs, etc that are not needed… logs from version 14 versions back over years…

do we really need to keep a cache folder in Cache/phototranscoder of EVERY thumbnail and graphic in EVERY size ever created? that alone is a 6GB file!!

with compute fast and cheap these days can this not be pruned to the last 30-90 days of activity and recreated when needed… it probably houses formats and sized for clients that I probably dont even use anymore…

and it goes on and on…

my plex media server folder is 18GB … and I dont think I have a very big library and I have BIF turned off… just chapter thumbs…

anyone have a script or reccomendation on cleaning these folders out…

and Plex… how about a little house keeping programming in the codebase please… half this crap should probably be kept in the tmp folder and trashed on reboots…

thanks

Log files are usually ‘rotated’ which gets you one ‘current’ log file of every type and 5 ‘historic’ files.
The oldest gets deleted.
If you find older log files in your log folder, I am sure these are from very old plex versions where this ‘log rotation’ wasn’t implemented yet. It is safe to delete these.

As for cached thumbnails and such:
Everything that can be safely deleted without impending operation of your server will get deleted
by the Plex butler:
Settings - Server - Scheduled Tasks:
‘Remove old bundles every week’
‘Remove old cache files every week’
‘Optimize database every week’

But for these tasks to get executed, your server machine must actually be running at the scheduled time. You might wanna adjust the time window to accomodate your usage pattern better.

its got log folders for every installed version going back years…

its got dump files from more than a year ago

all those options are one an the server is on 24/7

the butler in my opinion is not doing its job of cleaning house… period…

and how many database backups is plex supposed to keep… there are bunches of those too…

again… only application on ubuntu server that I run that allows itself to run amok like this is plex…

a very dirty program with minimal, or not well thougth out hosekeeping… hopefully you can upchannel to the devs and lets see if they cant clean this up a bit

You need to set the options accordingly to what @OttoKerner has suggested.

@danjames92

What about… all those options are already on doesnt translate…

I have been using plex since the beginning… I am not new at this …

I have never seen this issue and I’ve been using plex since its inception.

A permissions issue might be the culprit. If Plex can’t delete files then it will just continue to make new ones.

The only time I have seen it keep old log files was after the transition from Plex Media Server.log.x to Plex Media Server.x.log. I actually just deleted them from log folder this week as they were back from around February I think.

@dragonmel said:
@danjames92

What about… all those options are already on doesnt translate…

I have been using plex since the beginning… I am not new at this …

Indeed… The typical mentality is brought to the thread… OP is doing it wrong 'cos Plex never fails at anything!!

Unless you changed something in the first place (which I doubt) I really don’t know why you need to set anything at all…They’re either pre-set or they don’t work.

Actually, I’ve also noticed an excess of stuff Plex keeps around. Not logs or backups, but cache stuff. My butler is set correctly.

My computer has a system drive with about 450gb dedicated to Plex alone and to my dismay, the space is soon up. I have about 100gb left, constantly declining, the rest has been eaten by this. I never thought Plex needed so much space back when I installed it tbh.

I have checked and about 70% of the space comes from the thumbnail creation. Fine, I choose to have it on anyway, and I understand I can delete them if it goes too far. I also know Plex warns that it could take space but I never thought it would mean several hundred gbs. But the real issue here is that Plex seems to cache every single little thing, and I have a lot of music (200k tracks) and the music cache is like 100gb alone. That’s insane, especially since all my artwork is locally stored.

I mean I guess I understand why this is needed, but one have to wonder if this could be optimized a bit somehow? Plex taking over 300gb space is crazy to me.

@d2freak said:
Actually, I’ve also noticed an excess of stuff Plex keeps around. Not logs or backups, but cache stuff. My butler is set correctly.

My computer has a system drive with about 450gb dedicated to Plex alone and to my dismay, the space is soon up. I have about 100gb left, constantly declining, the rest has been eaten by this. I never thought Plex needed so much space back when I installed it tbh.

I have checked and about 70% of the space comes from the thumbnail creation. Fine, I choose to have it on anyway, and I understand I can delete them if it goes too far. I also know Plex warns that it could take space but I never thought it would mean several hundred gbs. But the real issue here is that Plex seems to cache every single little thing, and I have a lot of music (200k tracks) and the music cache is like 100gb alone. That’s insane, especially since all my artwork is locally stored.

I mean I guess I understand why this is needed, but one have to wonder if this could be optimized a bit somehow? Plex taking over 300gb space is crazy to me.

Don’t use it then.

@danjames92 said:

Don’t use it then.

Trolling, waste of a response.

@foebik said:

@danjames92 said:

Don’t use it then.

Trolling, waste of a response.

If you don’t want it to use space, don’t use the option. It’s not like you have a choice at how large the data is…

@danjames92 said:
Don’t use it then.

Always good to see such a useful comment.

Plex should clean the system out of the box with the appropriate settings (see above). If that fails, you could try removing the files manually and watch as Plex recreates them. Since Plex will generate most of the files again, you might want to write a script that stops the service, does some cleanup and starts the service again. Not elegant, but maybe better than your current situation.

Have a good look at your file system rights as well. It might be possible that Plex nowadays needs different rights than was the case when you installed the system.

As for me, I have a pretty large installation with around 60k Music files, 10k episodes and 4k movies. Needless to say that I have been using Plex for quiet some time now as well. I have to admit though, that I did some complete reinstalls and rescans of my media, since some things just didn’t work for me during the upgrades. My Cache is around 3.5 GB, My Metadata directory holds 39 GB and my Logs folder holds 5 old versions of each file (as expected).

One final…

@dragonmel said:
with compute fast and cheap these days can this not be pruned to the last 30-90 days of activity and recreated when >needed… it probably houses formats and sized for clients that I probably dont even use anymore…

You are right! But disk is still cheaper :wink:

@SingleServingSociety

while I dont argue that disk space is cheap…

data base bloat, and crapping up support directories slow everthing down, increase corruption, slow backups and migration, add to latency and on and on…

either way its piss poor programming and accepting mediocrity should not be acceptible practice in software that is sold for profit and no longer a community freeware…

if its broken … fix it…

if it was never programmed to properly keep itself clean…than take this as a request to make the software more professional and worthy of the price you are now charging for it…

enough said

You don’t get to comment on the quality of code unless you’re a developer with access to the code.

@danjames92

G-T-H

I am a developer and I dont have to see the source to know its not doing its job here.

now if you are not going to contribute something even remotely constructive… take this as an invitation to stay off my posts…

thanks

Public forum. I’ll post wherever I please thanks.

Have you looked through the code to determine what isn’t working as it should? No? Then I don’t think you get to say that.

Guys, this is not a reason to get in an argument. Folks can comment on how well Plex is not working or not. We do ask that you not use foul language, attack/harass folks etc as mentioned into the guidelines linked on top of forum. Nothing said particularly here hurt any of the devs feelings.

Two different ninjas have already posted in this thread and will bring it to devs attention if needed.

@BigWheel

thanks for being an adult here and getting the kiddies in line… I appreciate that the devs have taken my tounge and cheek titled post for what it was… an observation that I am sure is not indicitive on how the devs would like their code to be performing so that it could be investigated and improved.

I can assure you that server appication settings are correct and permissions for this install are working correctly as well.

@danjames92 while this is a public forum it exists to be ‘constructive’ (not your personal trolling grounds) and since several folks here on just this thread alone didnt appreciate your words, tones and trolling, perhaps you should not be alowed out in public… perhaps plex will fix that as well…