BUG (Critical): PMS on SHIELD cache folder does not honor Plex Data Storage Location

Server Version#: 1.19.4.2935
Platform: SHIELD TV Pro 2019

When the PMS storage location on SHIELD is set to a removable drive, the cache folder is created in:

[external drive]\Android\data\com.plexapp.mediaserver.smb

But it remains empty and instead keeps recreating internal\Android\data\com.plexapp.mediaserver.smb\cache and filling that folder up instead.

Clearing cache causes the cache folder in internal to disappear, and get recreated again the next time PMS is started. Interestingly, deleting cache on the removable drive path will also see it recreated by PMS though remains unused.

This is a big problem with PMS on SHIELD because it has so little internal storage. I’m guessing I can work around this by adopting storage instead… maybe, but I don’t want to have to do this.

I noticed this after I made it a habit of keeping an eye on how much of the internal storage PMS eats up after another bug involving intro scanning was trashing it despite being set to use the removable drive. That bug is fixed now apparently with the last release, and I’m not sure if the cache folder not honoring your PMS storage location preference is a regression or not but it definitely is a problem.

Here is an example line showing it keeps using internal cache folder with all other data moved to removable:

Jun 23, 2020 00:29:24.956 [8573] DEBUG - Photo cache obtained 322129 bytes from /library/metadata/16256/thumb/1592741170?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Jun 23, 2020 00:29:24.956 [8573] DEBUG - Saving original media file to /storage/emulated/0/Android/data/com.plexapp.mediaserver.smb/cache/PhotoTranscoder/63/63a7ad971c4efe3f094877d8834ed57652165fd2.jpg

4 Likes

this is very critical.
inside of shield storage’s cache folder getting bigger and bigger.
and finally there is no more space to use it.

1 Like

It has been a month now with nobody from Plex acknowledging this problem and nothing about it being mentioned in release notes beta or otherwise. Is there a better way for a Plex Pass user to get some kind of support than posting and praying? This is a system breaking bug when you have a large library.

1 Like

It has been about two months now. Can somebody please at least acknowledge this is a problem that requires fixing or suggest if there is some other way that I can actually receive customer support?

I can elaborate on the reasoning a bit :slight_smile:

  • We use the internal cache for a few things, and this is by-design. We do this to ensure the system can clean up temporary files as needed AND to give you the option to “Clear cache” through the android system settings. PMS tries not to manage these things itself… like most apps that make use of a system /tmp.
  • You can move the video transcode directory to external storage using the PMS preference.

If, however, you are seeing the cache fill up unexpectedly then we may have a bug (like the intro skipping one you point to in the OP).

I hope that makes sense.

@StSimm1 Thank you for taking the time to reply, much appreciated.

I already have video transcode directory set up to the external storage, it’s not video transcodes it’s every other thing that Plex puts into /cache… it all goes into /cache in internal storage and not the cache folder on the specified external drive.

Why does the photo transcoder stuff etc. need to be on the internal storage instead of external? I mean, I find my PMS cache regularly 8+ GB in size and I only have around 5 users. On the Shield TV this is the vast majority of the free space - if I actually used my storage for much else other than Plex I would be continually running out of space despite instructing plex to keep it’s big data on a 1tb removable SSD. Given the fact that the shield uses flash memory for it’s internal storage, churning all of Plex’s cache on internal is also going to wear it out way faster than it otherwise would.

I’m fine with some of the PMS cache data staying on internal, but the stuff with the possibility of getting really big that is constantly changing (like the photo transcoder stuff) really needs to be moved to external when the user has asked plex to put it’s data on the external storage.

I run my PMS off of a SHIELD too, and have never seen that sort of usage… but I know everyone’s setup is somewhat unique :smiley:

I’ll raise it in our next triage meeting; but it’s non-trivial to move that directory. We would need to start managing the lifetime of the files… which could lead to use missing things.

@StSimm1

Thanks. Can we just have PMS create a symlink for internal/cache that points to external/cache when the user has external storage set up?

In terms of workarounds for now, do you have any suggestions? If I abandon the idea of keeping my storage “removable” would adopting it instead work around my problem? Is PMS and all of it’s data including cache etc. fully movable to adopted storage?

1 Like

Does that mean we can now sync larger movies to our mobile device? Previously this wasn’t possible, see here:

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