/Cache/Transcode/Detection Directory usage too high

Server Version#: 4.34.4
Player Version#: unrelated

Cache/Transcode/Detection is HUGE taking up a lot of space. The impression that I have is that pelx is not deleting the old trancoding files.

Currently the directory is 137G. And the oldest file if from 9 days ago. Can I ask plex to delete the files daily ?

ubuntu@localhost:/mnt/usbstorage/plex/Cache/Transcode/Detection$ du -h
137G .

Otherwise I will add to the crontab the command below:

find /mnt/usbstorage/plex/Cache/Transcode/Detection* -mtime +2 -exec rm {} ;

Is that created by normal transcoding, or part of the DVR pipeline? I have to agree with your conclusion that something is going wrong. (edited)

It won’t address whatever your core issue is, but I wanted to suggest that find has the -delete action, which is faster and prettier, and goes depth-first, so it will delete files before directories.

find /mnt/usbstorage/plex/Cache/Transcode/Detection -mtime +2 -delete

May I see the DEBUG log files please (VERBOSE off),
which are captured right after terminating a playback session which transcodes the video?

To create:

  1. start playback
  2. let play for 1 minute
  3. stop playback
  4. wait 30 seconds
  5. settings - server - troubleshooting - download logs
  6. attach the ZIP it gives you
1 Like

I don’t use DVR, so it should be the normal transcoding.

Thanks for the tip on -delete from the find command. :slight_smile:

1 Like

Hi, follow the logs below

PMS can’t clean up the sessions.

Sep 20, 2020 16:17:59.029 [0x7f8aee9000] DEBUG - Transcoder: Cleaning old transcode directory: "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-he3tt1eugqcfeolz9p40oaey-0f968b1c-1d3b-4f85-b838-4e0fe73a7a02"
Sep 20, 2020 16:17:59.093 [0x7f8aee9000] ERROR - Transcoder: Failed to delete session directory (boost::filesystem::remove: Directory not empty: "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-he3tt1eugqcfeolz9p40oaey-0f968b1c-1d3b-4f85-b838-4e0fe73a7a02")
Sep 20, 2020 16:17:59.432 [0x7f8aee9000] DEBUG - MyPlex: using cached data for request for https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx&includeProfiles=1&includeProviders=1
Sep 20, 2020 16:17:59.435 [0x7f8aee9000] DEBUG - MyPlex: updating with 20 access tokens

which username does this run as? User plex ?
have you recently changed / customized the configuration in any way?

1 Like

It is plex the user

thanks.

please do the following:

sudo bash
cd /var/lib/plexmediaserver
chown -R plex:plex .
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

then restart

You might need clean it up once.

Ok, done. Let’s wait if the problem solves :slight_smile:

Hi

I think I’m having this issue too - my Plex Media Server\Transcode\Detection folder is 185gb and I think has just been filling up since I started the server in July. Why aren’t these files deleting themselves? I’m on an Nvidia Shield though.

Thanks
James

Seems according to Intro Detection: Temp Folder Won't Clear it’s safe to just delete the files there but it does it suggest a bug on my server that needs fixing to prevent it continuing? I’ve turned off intro detection in the meantime.

Hi, i didn’t update on the issue and I am sorry. The problem is solved
But to be honest I don’t know if it was ChuckPa suggestion or the crontab script I made.

I think both ways can solve the problem, but the most elegant solution for sure is to change the ownership as ChuckPa suggested.

Thanks. Not sure how I’d do this with the server on an Nvidia Shield though. Really this just seems to the same big bug that was affecting users when intro detection was first added as a feature.

Would you agree it is safe to manually delete the content of that folder while I’m trying to fix this?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.