Credits detection doesn't clean after itself in /tmp

Hi, @ChuckPa. I wanted to add on to this thread as I am experiencing similar behavior. However, in my case, I do not appear to be generating any such error logs despite monitoring the logs actively through the console, and reference logs present in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs

At this time, similar to rafaels and pdan, I also have orphaned paths in /tmp that were left there. However, they presently contain no data.

$ du -sh /tmp/pms-*
0       /tmp/pms-5b8164f8-f744-405f-a3ae-30ee4ee3d4bf
0       /tmp/pms-6569a578-7b7d-46b7-81bd-93261307fc72
0       /tmp/pms-ce162763-f6a6-4b47-b388-72d029ed9c81
0       /tmp/pms-ec8035c0-0bef-4f4c-96c4-414bd64ace56

Similar to their situation, in my case, Plex is failing to successfully write anything under those directories because Plex has already consumed the entirety of available storage in /tmp (presently 9.7GB) - to the point that it is actively holding 12GB of 16-20GB (balloon device) of available vRAM, and consuming the entirety of available swap - which is not ideal for an SSD.

Plex continuously floods /tmp with tens of thousands of files in the format as follows:

$ ll /tmp                                                                                                                                                                    06:27:59 [11388/11388]
total 10111948
-rw-r--r--. 1 plex     plex       768150 Feb 19 07:04 0001b6af6c48a23010bff950e2977507.jpg
-rw-r--r--. 1 plex     plex        76424 Feb 19 06:31 000f0a4103c73355aaf85d1acd1bf8f3.jpg
-rw-r--r--. 1 plex     plex            0 Feb 13 07:41 001147f5-2009-48c9-a673-003ee8f3d632
-rw-r--r--. 1 plex     plex      1294124 Feb 20 03:51 0012238ef5f991d59f3c8c4696871d46.jpg
-rw-r--r--. 1 plex     plex            0 Feb 13 07:46 001b4a58-f154-49a6-b5d9-7fbcefbb2501
-rw-r--r--. 1 plex     plex       907741 Feb 16 07:43 001c70d3c0e25a87542dd024c8780e12.jpg
-rw-r--r--. 1 plex     plex       255700 Feb 16 07:59 001d9581592f96e17a45cd58e0f51ddd.jpg
-rw-r--r--. 1 plex     plex            0 Feb 13 07:41 0027d1c3-b461-4813-b0e3-e65f793a589e
-rw-r--r--. 1 plex     plex      1897463 Feb 16 07:37 0028d8e10924eeeea3333035ff7d7030.jpg
-rw-r--r--. 1 plex     plex        20831 Feb 19 07:04 0028e3aa81eb28baddcb3abc07d867fd.jpg
-rw-r--r--. 1 plex     plex       173548 Feb 23 03:55 00338447254d6919613d2b70e2120d29.jpg
-rw-r--r--. 1 plex     plex            0 Feb 13 07:52 004d28c3-7368-41ca-9513-551b319cf93d
-rw-r--r--. 1 plex     plex       169913 Feb 19 07:22 005936897927e09683af8b994bb8ab68.jpg
-rw-r--r--. 1 plex     plex      1115372 Feb 19 07:00 005f901c4c23f8146ceeb6003c4f27fb.jpg
-rw-r--r--. 1 plex     plex            0 Feb 13 07:53 006b55f3-1873-492b-8ab7-ef7a4b4241f6
-rw-r--r--. 1 plex     plex      2307811 Feb 19 06:44 007120ea75df28077a10f7207246254b.jpg
-rw-r--r--. 1 plex     plex            0 Feb 13 07:39 007de141-d963-4193-ab85-7e59e4c23348
-rw-r--r--. 1 plex     plex            0 Feb 23 04:06 007ff2c7-e15d-4e16-b491-3ee95d4714d0
-rw-r--r--. 1 plex     plex      1122732 Feb 19 06:56 00854f20a1fd666023b0a4ff71e66f37.jpg
-rw-r--r--. 1 plex     plex        90292 Feb 20 04:12 0087911150aedb51b8345412c8f31660.jpg
-rw-r--r--. 1 plex     plex      3028578 Feb 20 04:17 009a8853503fe175e9a902f772a5174e.jpg
-rw-r--r--. 1 plex     plex      2467653 Feb 20 04:01 009d9626209ed20f0dca16875b792077.jpg
[...]

Some of these paths have persisted since I last rebooted the server, and thousands of files have existed for the last 10 days:

$ uptime; ls -ltrh /tmp | grep plex
 06:44:35 up 20 days,  8:53,  5 users,  load average: 1.94, 1.55, 1.42
drwxr-xr-x. 3 plex     plex        60 Feb  3 15:32 pms-ce162763-f6a6-4b47-b388-72d029ed9c81
drwxr-xr-x. 3 plex     plex        60 Feb  5 04:58 pms-ec8035c0-0bef-4f4c-96c4-414bd64ace56
drwxr-xr-x. 3 plex     plex        60 Feb  7 03:07 pms-6569a578-7b7d-46b7-81bd-93261307fc72
-rw-r--r--. 1 plex     plex      180K Feb 13 07:31 a85f1fc8-1cde-4e68-9a4e-09d1ec5be704
-rw-r--r--. 1 plex     plex         0 Feb 13 07:31 c0c42d3b-9b83-49bd-b7e5-a3f9df310548
-rw-r--r--. 1 plex     plex         0 Feb 13 07:31 cc78157f-b727-4d26-aeef-c1eb45adb6bd
-rw-r--r--. 1 plex     plex         0 Feb 13 07:31 26495dcb-910f-42d3-a040-49c58d00c34e
-rw-r--r--. 1 plex     plex         0 Feb 13 07:31 6f1828e4-eeaf-463b-a70d-27717f8fa47c

…with others larger than 0 bytes having persisted for the last 9 days:

drwxr-xr-x. 3 plex     plex        60 Feb 13 15:14 pms-5b8164f8-f744-405f-a3ae-30ee4ee3d4bf
-rw-r--r--. 1 plex     plex      1.1M Feb 14 03:06 717afa5bf072e42d4d5e60f90726f5e4.jpg
-rw-r--r--. 1 plex     plex       94K Feb 14 05:24 aaf3e4332b28730a704be7fe5653b465.jpg
-rw-r--r--. 1 plex     plex      239K Feb 14 05:33 88790939c0765d028e9116821f95104c.jpg
-rw-r--r--. 1 plex     plex      194K Feb 14 05:33 c867ce6afedaea88f4a1a93eb1150c78.jpg
-rw-r--r--. 1 plex     plex      183K Feb 14 05:33 19599071f81c22c4eb520bdfe265bebb.jpg
-rw-r--r--. 1 plex     plex      1.2M Feb 14 05:33 c5a5ce63287092251b08668486204054.jpg
-rw-r--r--. 1 plex     plex      579K Feb 14 05:33 0434e810457e79452f6171a0c601d5fa.jpg
-rw-r--r--. 1 plex     plex      1.1M Feb 14 05:33 15308d526eb2e137a498df208aed3d4f.jpg
-rw-r--r--. 1 plex     plex      509K Feb 14 05:33 0af8e44eb848f94d041637a6e87beea5.jpg
-rw-r--r--. 1 plex     plex      2.3M Feb 14 05:33 8ad2f54b5ef5dbdd0cbef76e4fffb8df.jpg

It is possible that this may have an increased scope as well. For example, album artwork scanning for music libraries appears to either fail as a result of consuming available storage, and subsequently not clearing files, or albums will inexplicably lose artwork en masse across the entire library.


Plex Version: Version 1.41.4.9463 (consistent problem across multiple releases)
OS Release: Fedora Server 41
Install method: dnf

~$ ls -l
-rw-r--r--. 1 midnight midnight 105599340 Feb 10 10:44 plexmediaserver-1.41.4.9463-630c9f557.x86_64.rpm

~$ dnf info plexmediaserver
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : plexmediaserver
Epoch           : 0
Version         : 1.41.4.9463
Release         : 630c9f557
Architecture    : x86_64
Installed size  : 205.4 MiB
Source          : plexmediaserver-1.41.4.9463-630c9f557.src.rpm
From repository : @commandline
Summary         : Plex organizes all of your personal media so you can easily access and enjoy it.
URL             :
License         : Plex Inc.
Description     : Plex organizes all of your personal media so you can easily access and enjoy it.
Vendor          : <NULL>

Notably, this was a migration from Windows a little under a year ago. This issue was never experienced under Windows - though that is likely due to temporary files writing to disk there instead.


Storage Overview:

OS (25GB - 43% used): / - xfs
OS (250GB - 28% used): /var/lib/plexmediaserver - xfs - (separate mount)
OS (n - 100% used): /tmp - tmpfs, and managed by system – e.g.: ~8GB tmpfs when 16GB of vRAM, or ~10GB tmpfs when 20GB of vRAM.
Media (2TB - 69% used): /data - xfs - Plex Transcodes / Plex DVR Recordings (2x 1TB HDDs striped in LVG)
Media (Combined 186TB - ~69% used on average): 5x nfs4 - four mounted ro,v4.1, and one mounted nfs4 and ro, but no v4.1 flag.


The timestamps appear to be fairly consistent with my scheduled tasks timeframe (03:00 to 0800) - with the earliest typically appearing around 03:00-03:05, and the latest usually around 08:05.

In the short-term, as defined here, I’ve added a similar override. In this case, I’ve placed it at /data/Plex/TemporaryFiles, stopped plexmediaserver, moved mostly everything in /tmp owned by plex:plex over there using rsync -avP --removesourcefiles, and restarted everything.

$ sudo mkdir /etc/systemd/system/plexmediaserver.d
$ sudo vi /etc/systemd/system/plexmediaserver.d/override.conf
$ sudo cat /etc/systemd/system/plexmediaserver.d/override.conf
[Service]
Environment="PLEX_MEDIA_SERVER_TMPDIR=/data/Plex/TemporaryFiles"
Environment="TMPDIR=/data/Plex/TemporaryFiles"
$ sudo rsync -avP --remove-source-files /tmp/pms-* /data/Plex/TemporaryFiles/
$ sudo rsync -avP --remove-source-files /tmp/*.jpg /data/Plex/TemporaryFiles/
$ sudo -u plex mkdir /data/Plex/TemporaryFiles
$ sudo -u plex touch /data/Plex/TemporaryFiles/Hello
$ sudo -u plex rm /data/Plex/TemporaryFiles/Hello
$ sudo systemctl restart plexmediaserver
$ sudo systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server
     Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: active (running) since Sun 2025-02-23 07:17:55 EST; 9min ago
 Invocation: ae2658d0d84345e28091a9fac1696105
    Process: 3593070 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
   Main PID: 3593072 (Plex Media Serv)
      Tasks: 83 (limit: 23869)
     Memory: 5.6G (peak: 5.7G swap: 61.3M swap peak: 74.5M)
        CPU: 11min 45.401s
     CGroup: /system.slice/plexmediaserver.service
             ├─3593072 "/usr/lib/plexmediaserver/Plex Media Server"
             ├─3593118 "Plex Plug-in [com.plexapp.system]" /usr/lib/plexmediaserver/Resources/Plug-ins-630c9f557/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.41.4.9463-63>
             ├─3593204 "/usr/lib/plexmediaserver/Plex Tuner Service" /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.41.4.9463-630c9f557 32600
             ├─3593252 "Plex Plug-in [com.plexapp.agents.imdb]" /usr/lib/plexmediaserver/Resources/Plug-ins-630c9f557/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.41.4.94>
             ├─3593499 "/usr/lib/plexmediaserver/Plex Relay" -p 443 -N -R 0:127.0.0.1:32401 -o StrictHostKeyChecking=yes -o "UserKnownHostsFile=/var/lib/plexmediaserver/Library/Application Support/Plex Media Ser>
             └─3593505 "/usr/lib/plexmediaserver/Plex Relay" -p 443 -N -R 0:127.0.0.1:32401 -o StrictHostKeyChecking=yes -o "UserKnownHostsFile=/var/lib/plexmediaserver/Library/Application Support/Plex Media Ser>

Feb 23 07:17:55 v-plex systemd[1]: Starting plexmediaserver.service - Plex Media Server...
Feb 23 07:17:55 v-plex systemd[1]: Started plexmediaserver.service - Plex Media Server.

We’ll see what happens…