The idea came from me because I noticed it in the log file.
The override.conf didn’t work. It is still using /tmp. I used the prescribed method for overriding the contents of a .service file. The systemctl show plexmediaserver shows that it is picking up the ENV variables from the override.conf:
It may have always used /tmp in the past, and that’s fine, but something in the last version update has changed, which is negatively affecting the Operating System. If Plex needs a large tmp volume then that should be checked in the installation to make sure its large enough, or used an alternative directory that is large enough. Using /tmp and blowing up and leaving the partition full when it’s done is an unreasonable outcome, other services and the OS depend on having adequate /tmp space.
I haven’t found anywhere where tmp space size is specified for Plex.
I realize that EAE_ROOT is internal, but you stated that:
I read that to mean that EAE_ROOT is not exposed, but would honor PLEX_MEDIA_SERVER_TMPDIR since that var IS user facing (it is in the .service file). If this isn’t the case, then my request would be that EAE_ROOT uses PLEX_MEDIA_SERVER_TMPDIR.
What’s considered to be an appropriate size available for ${TMPDIR}? Yes, I know, that’s an unfair question.
Oh, now that’s interesting… somewhere along the line, Transcoder temporary directory has been set to a null/default value. It should have been pointing to a location with nearly 300gb free.
What is the aggregate output bit rate of all concurrent sessions ?
How far of a “Seek backwards” buffer do you want to maintain?
What’s the total run time of all the files which overlap?
I ask this because the correct answer is based entirely on how you use PMS and how you answered the four questions.
Why are they important?
The transcoder will prune already-played buffers when space gets low.
If you seek backwards to a point in time which has already been pruned, the transcoder will need regenerate those buffers
If, while generating those buffers, it can’t keep the unplayed buffers due to lack of space, the unplayed will be deleted and generated again as needed.
At installation time, how can it know how you intend to use your system?
You may like my scripting work but I’m not that good
I have confirmed that setting TMPDIR inside the /etc/systemd/system/plexmediaserver.service.d/override.conf fixes the issue. I now see this in my log file:
So this is good! I like that it follows the existing TMPDIR environment variable convention. I should have known after all these years working with Linux what you meant about TMPDIR. I was thrown off by the log message and that is when I tried to set EAE_ROOT.
The .service file has PLEX_MEDIA_SERVER_TMPDIR right in it. It seems to a bit off to me to have a PLEX_MEDIA_SERVER_TMPDIR environment variable (looks obvious enough), but not have everything inside Plex not follow that directive. It might be better just to have TMPDIR, which is the normal convention, in the .service file and get rid of PLEX_MEDIA_SERVER_TMPDIR. What are your thoughts on this?
# Use first found of 4 possible Temp Dir specifications (warp core)
OverrideTmpdir="$(GetValue PLEX_MEDIA_SERVER_TMPDIR "$OverrideFile")"
if [ "$OverrideTmpDir" = "" ]; then
OverrideTmpDir="$(GetValue TMPDIR "$OverrideFile")"
if [ "$OverrideTmpDir" = "" ]; then
OverrideTmpDir="$(GetValue TEMP "$OverrideFile")"
if [ "$OverrideTmpDir" = "" ]; then
OverrideTmpDir="$(GetValue TMP "$OverrideFile")"
fi
fi
fi
I do not think it is honoring PLEX_MEDIA_SERVER_TMPDIR though. On my ubuntu 18.04 I have a 80G /dev/shm in place, and have set the transcoding directory to /dev/shm. I have Transcoder temporary directory set to /dev/shm but EAE is still throwing everything inside of /tmp. Now, not a huge deal to me since it’s still in memory, but it not honoring that setting could be troublesome for others.
Yup! My first instinct was to look at the .service file and right there is PLEX_MEDIA_SERVER_TMPDIR. Which goes back to my original point that EAE_ROOT should follow PLEX_MEDIA_SERVER_TMPDIR. It doesn’t.
It’s nice that there is a work-around (TMPDIR), but that is less intuitive when the .service file lays out the default options.
On POSIX systems, the path may be the one specified in the environment variables TMPDIR , TMP , TEMP , TEMPDIR , and, if none of them are specified, the path “/tmp” is returned.
We chatted and there will be a blanket update of packaging to clear up the misinformation.
Yes, I haven’t responded… been tinkering a bit with LiveTV buffers. The volume that I’m currently using seems to be overkill by a couple of orders of magnitude. Go big or go home.
Interesting discussion & usage of env vars that’s far more dependent on operating system than I’d have thought.
I like specifying a plex temp directory it instead of using the system default (but I understanding using the default if none is specified). Especially since the server could be doing other things than just plex. My default 500MB tmp partition works fine for the rest of the processes running on the server, but I would like to specify a tmp directory for plex, within my media partition which had terabytes of free space. I would also hope that plex periodically cleaned the temp space or cleared it when the plex process starts.
Thanks for all the attention you have given this issue.
Am I correct, that a specific PLEX_MEDIA_SERVER_TMPDIR is actually requested?
I ask because, at present, PMS uses mkstemp in conjunction with the C++ standard on Linux for temporary directories for POSIX compliance.
I don’t think that it is required. If Plex always used mkstemp then a PLEX_MEDIA_SERVER_TMPDIR was never required and should have been removed from the .service file long ago. It would have been helpful to have a hint in the file (e.g. a commented out TMPDIR line) to help inform me that Plex uses the standard function.
@Disputin, use the override.conf file like @ChuckPa has shown. It will ONLY impact that particular service. I have tested this and it works.