Linux Plex server tmp folder filling up

Server Version#: 1.28.0.5999
Player Version#: 1.49.1.3146-73559c78

I have a problem with repopulating my Debian 11 Openmediavault Plex server. Plex server keeps filling up the /tmp partition with jpg files. These are the movie/TV/Music posters.
these are not deleted after use.

root@nas:/# df -kh /tmp
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.5G 62M 1.4G 5% /tmp

root@nas:/# ls -1 /tmp

12b7686c5f78ff6fbc575f3cc49545b0.jpg
137694ff321598b583c3e8124f36c7ee.jpg
1474c53c65d92f6534803e12f7a9088e.jpg
1f7a6bffcd01e44d1e519799dfd60329.jpg
1f89e4df777c70c422719a2054c592e1.jpg
2cb566498ea457577ed096ece9c8f1dc.jpg
…

Is there a way to redirect Plex media server to a different folder for these temporary files?
I have looked in the config files but cannot find any option to do this myself.

Thanks

PMS responds to the TEMPDIR or TMPDIR environment variables.

Did you set your transcoder temp to /tmp?

on Debian TEMPDIR or TMPDIR variable not set.
root@nas:/etc# systemctl status plexmediaserver.service
â—Ź plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-08-04 09:18:57 AEST; 3h 4min ago
Process: 699605 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: 699608 (Plex Media Serv)
Tasks: 52 (limit: 3531)
Memory: 400.7M
CPU: 1h 33min 37.302s
CGroup: /system.slice/plexmediaserver.service
├─699608 /usr/lib/plexmediaserver/Plex Media Server
├─699670 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-97678ded3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.0.599>
├─699781 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.28.0.5999-97678ded3 32600
└─737126 /usr/lib/plexmediaserver/Plex Media Scanner --match --type 1 --log-file-suffix Matcher --files /storage/PlexMedia/LeenMovies/Trading Places (1984)/Trading Places (1080p HD).m4v

as this is a service, where to set these variables for plexserver only?

Start here:

In the override file

[Service]
Environment="PLEX_MEDIA_SERVER_TMPDIR=/path/you/want"

This is not the same as the Transcoder Temp Dir which you set in Preferences.

NOTE: To clarify, on SYSV Linux systems, I map TMPDIR or TEMP or TEMPDIR to PLEX_MEDIA_SERVER_TMPDIR for PMS.

2 Likes

Thank you for your response. The provided Environment variable “PLEX_MEDIA_SERVER_TMPDIR” did not work on my Debian 11 server but adding Environment variables TMPDIR and TEMPDIR did fix my issue.
I won’t be running out of disk space anytime soon.

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