# PMS stopped honoring temporary directory setting. Now uses /tmp

**URL:** <https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [May 23, 2020, 5:30pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501 "2020-05-23T17:30:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 5:30pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/1 "2020-05-23T17:30:37Z")

</div>

Server Version#: 1.19.3.2843

Recently Plex server stopped honoring the setting:

TranscoderTempDirectory="/plex/tmp"

It created a directory /tmp/pms- and files in /tmp that look like random uuids. I have only recently ran into this issue after running PMS for at least 5 years. The files and dir were created a little after 3:00am, but I don’t see that anyone was accessing the PMS at that time.

I’m running on the beta channel, but will be reverting to stable to see if the problem goes away.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 23, 2020, 6:20pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/2 "2020-05-23T18:20:26Z")

</div>

Logs please which capture this?

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 7:54pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/3 "2020-05-23T19:54:49Z")

</div>

Ah ha! I found this in the log:  
`Plex Media Server.5.log:May 23, 2020 05:00:24.051 [0x7f65827fc700] DEBUG - Job running: EAE_ROOT='/tmp/pms-d4409607-1179-44e8-8b4e-87c3756b9916/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/99c90e0-3095-linux-x86_64/' XDG_CACHE_HOME='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:1' 'eac3_eae' '-eae_prefix:1' '6632720a-aec5-4a0c-aae2-ae8c3e48cf77_' '-analyzeduration' '20000000' '-probesize' '20000000' '-i'`

I’m not sure what started provoking this, it it appears that the EAE\_ROOT is the problem. Where can I set EAE\_ROOT so it doesn’t sue the default /tmp volume?

---

<div class="post-metadata">

**Author:** ![blim5001](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@blim5001](https://forums.plex.tv/u/blim5001)\
**Post date:** [May 23, 2020, 8:08pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/4 "2020-05-23T20:08:48Z")

</div>

> [@jeffgus](#):
>
> I’m not sure what started provoking this

Pretty sure that is the new ‘Skip Intros’ feature, that scans your TV Shows to detect the Intros. It has been added with the latest release of PMS (and is enabled by default)

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 8:11pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/5 "2020-05-23T20:11:05Z")

</div>

I used the systemd edit command to set new env variables. I set the override.conf like so:

```auto
[Service]
Environment=PLEX_MEDIA_SERVER_TMPDIR=/plex/tmp
Environment=EAE_ROOT=/plex/tmp

```

I thought the TMPDIR was handled by setting that in the WebUI (which writes out Preferences.xml). Not sure why EAE\_ROOT is using /tmp. It could have been using it for awhile, but I never noticed it until something else happened (even a change in how I’ve been using Plex Server).

Hopefully it will make it through the night without this problem. Would it be possible for Plex Server to honor a global tmp setting for whatever it is doing?

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 8:28pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/6 "2020-05-23T20:28:47Z")

</div>

> [@blim5001](#):
>
> Pretty sure that is the new ‘Skip Intros’ feature, that scans your TV Shows to detect the Intros. It has been added with the latest release of PMS (and is enabled by default)

Oh interesting! I just checked and, sure enough, it is on. I don’t have an issue with it being on by default, but I would like the feature to honor the tmp dir setting.

---

<div class="post-metadata">

**Author:** ![ZeroFux](https://avatars.discourse-cdn.com/v4/letter/z/f475e1/32.png) [@ZeroFux](https://forums.plex.tv/u/ZeroFux)\
**Post date:** [May 23, 2020, 8:41pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/7 "2020-05-23T20:41:12Z")

</div>

My Transcoder temp directory is a ram disk to keep the files off the SSD. I wonder if I move this new temp directory to the RAM disk, would it add any efficiency or speed to the intro detection process?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 23, 2020, 8:41pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/8 "2020-05-23T20:41:58Z")

</div>

> [@jeffgus](#):
>
> `EAE_ROOT=/plex/tmp`

EAE\_ROOT isn’t a variable I know of. Where did you get that information?  
(I’m aware of what the transcoder uses. Specifically, where is it set as externally accessible?)

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 9:02pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/9 "2020-05-23T21:02:39Z")

</div>

It was shown in the logfile snippet I posted.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 23, 2020, 9:16pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/10 "2020-05-23T21:16:52Z")

</div>

That’s the internal communication between PMS and the transcoder.

AFAIK, there is no user-facing variable you can set. I looked through the source code.

It is my understanding that EAE operates based on Plex’s normal temp directory. It created sub directories for each session under it.

Even if you did set the variable, PMS is going to overwrite it as it passes it to the transcoder.

To be certain I don’t get it wrong, I’ve sent a message to the team to ask clarification

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 9:32pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/11 "2020-05-23T21:32:00Z")

</div>

I also overrode PLEX\_MEDIA\_SERVER\_TMPDIR in case that is different from the Preferences.xml file. It seems to me that EAE\_ROOT should honor one of those settings. Could you get clarification on which one it honors? If it is its own thing, then there needs to be a way to set it.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 23, 2020, 10:04pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/12 "2020-05-23T22:04:47Z")

</div>

Which distribution and version is this running on?

Is it systemd based or init based?

I ask because some of the older variables where brought forward when I added SYSV-init compatibility back into PMS.

EDIT: I see now it’s systemd

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 10:11pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/13 "2020-05-23T22:11:05Z")

</div>

I’m using Fedora 31 which is systemd based. The service file (which is included in the RPM package) has these variables in it:

```auto
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/
Library/Application Support"
Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
Environment=PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
Environment=PLEX_MEDIA_SERVER_TMPDIR=/tmp

```

I created an override.conf file that changes the PLEX\_MEDIA\_SERVER\_TMPDIR var and I also added the EAE\_ROOT (but I’m not sure if it will do anything).

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 23, 2020, 10:18pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/14 "2020-05-23T22:18:10Z")

</div>

I looked again in the PMS source code.  
From what I can see,

1. it’s using PLEX\_MEDIA\_SERVER\_TMPDIR as the foundation to create EAE\_ROOT variable, along with the others, just prior to launch.
2. They use the kernel’s Notify mechanism to monitor the output files from the EAE (it has a primitive interface but must remain as it is)

I don’t see where you can set it. When did you have the ability to set it?

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 23, 2020, 10:38pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/15 "2020-05-23T22:38:13Z")

</div>

Oh good! So it does use TMPDIR var. I wish it would use the Preferences.xml so it is easy to set from anywhere.

The way I’m setting it is to create an `override.conf` file in `/etc/systemd/system/plexmediaserver.service.d`. I put these items in the file:

```auto
[Service]
Environment=PLEX_MEDIA_SERVER_TMPDIR=/plex/tmp
Environment=EAE_ROOT=/plex/tmp

```

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 23, 2020, 11:04pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/16 "2020-05-23T23:04:01Z")

</div>

What you have there is ok except that `EAE_ROOT` is not user-facing.

Moving the TMPDIR is sufficient.

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 24, 2020, 4:52am UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/17 "2020-05-24T04:52:33Z")

</div>

Ah! Ok. It appears that before the new feature, the Preferences.xml file did what I needed it to do. This is not good enough with the skip intro feature. Hopefully tonight, the `PLEX_MEDIA_SERVER_TMPDIR` setting fixes the issue with /tmp.

My recommendation is that there is a clearly labeled setting (WebUI?) that covered all uses of a temporary directory.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 24, 2020, 5:09am UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/18 "2020-05-24T05:09:59Z")

</div>

Settings - Server - Transcoder - Show Advanced:

```auto
Transcoder temporary directory

__________________________________________
Directory to use when transcoding for temporary files.

```

---

<div class="post-metadata">

**Author:** ![jeffgus](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jeffgus](https://forums.plex.tv/u/jeffgus)\
**Post date:** [May 24, 2020, 6:18am UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/19 "2020-05-24T06:18:27Z")

</div>

> [@ChuckPa](#):
>
> Settings - Server - Transcoder - Show Advanced:
> 
> ```auto
> Transcoder temporary directory
> 
> ```

Yes, that is the setting I’ve had for something like 5 years now. The problem is that EAE\_ROOT doesn’t know about that setting! I hope that this disconnect will be fixed.

---

<div class="post-metadata">

**Author:** ![Disputin](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@Disputin](https://forums.plex.tv/u/Disputin)\
**Post date:** [May 24, 2020, 4:24pm UTC](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501/20 "2020-05-24T16:24:51Z")

</div>

I am having the exact same issue on Ubuntu 18.04/systemd.

So should I apply the override to systemd or is there a fix in the pipeline?

I can continue to delete files if there is an imminent fix coming soon.

[Next page](https://forums.plex.tv/t/pms-stopped-honoring-temporary-directory-setting-now-uses-tmp/594501.md?page=2)
