Hi, I’m using Plex server 4.125.1 on a Synology NAS that runs DSM 7.2. I recently migrated my install to Docker. That worked fine, but I’ve started having issues where the container shows high CPU and becomes unhealthy. Looking at the Plex console, red errors appear.
In the logs, that looks like this (repeated until I restart the container):
EAE not running, or wrong folder? Could not read '/tmp/pms-fc5b33c4-b1f7-4149-88ba-ff5bbb197637/EasyAudioEncoder/Convert to WAV (to 8ch or less)/3a566887-7c0b-4014-a165-4bd6fe7d8cac_26435-0-2178.wav'
May 28, 2024 11:46:29.001 [139896006974264] ERROR - [Req#1944e/Transcode/3a566887-7c0b-4014-a165-4bd6fe7d8cac/609b11a4-1327-40cf-b298-054805bb54ce] [eac3_eae @ 0x7f5d68fffdc0] error reading output: -5 (I/O error)
May 28, 2024 11:46:29.001 [139896012340024] ERROR - [Req#1944f/Transcode/3a566887-7c0b-4014-a165-4bd6fe7d8cac/609b11a4-1327-40cf-b298-054805bb54ce] Error while decoding stream #0:4: I/O error
May 28, 2024 11:46:34.000 [139895996791608] ERROR - [Req#19450/Transcode/3a566887-7c0b-4014-a165-4bd6fe7d8cac/609b11a4-1327-40cf-b298-054805bb54ce] [eac3_eae @ 0x7f5d68fffdc0] EAE timeout! EAE not running, or wrong folder? Could not read '/tmp/pms-fc5b33c4-b1f7-4149-88ba-ff5bbb197637/EasyAudioEncoder/Convert to WAV (to 8ch or less)/3a566887-7c0b-4014-a165-4bd6fe7d8cac_26435-0-2179.wav'
May 28, 2024 11:46:34.001 [139896006974264] ERROR - [Req#19451/Transcode/3a566887-7c0b-4014-a165-4bd6fe7d8cac/609b11a4-1327-40cf-b298-054805bb54ce] [eac3_eae @ 0x7f5d68fffdc0] error reading output: -5 (I/O error)
May 28, 2024 11:46:34.001 [139896012340024] ERROR - [Req#19452/Transcode/3a566887-7c0b-4014-a165-4bd6fe7d8cac/609b11a4-1327-40cf-b298-054805bb54ce] Error while decoding stream #0:4: I/O error
I’m not sure how to troubleshoot. Maybe I’ve mapped a volume wrong in my docker-compose and Plex can’t find the transcode folder? But, I don’t transcode and actually turned off remote sharing to try to fix this. Also, the issue happens sporadically.
As an update, I just checked my docker install folder and Plex has added many new folders for EasyAudioEncoder. Surely this is related. Screenshot attached.
These are the volumes I’ve mapped. Is this wrong? Plex does use the /config folder from the first volume mapping despite me not explicitly pointing to that in the install folder, but it does not use /tmp, which is empty. I had trouble finding a docker-compose that worked and maybe this doesn’t.
Why not use the native Synology app?
You’ll not have to fuss with a compose
All the files will properly be setup for you in the PlexMediaServer shared folder.
You’ll only need worry about granting PlexMediaServer permission to read the media files
Secondary to that is what you show here.
Given your docker compose file is not using absolute pathnames, it’s uncertain what you’ve done as ./plex would normally be created as /./plex . The root (/) partition of all synology systems is only about 2.4 GB and will quickly overflow – creating problems.
If ./plex does end up as /volume1/./plex – that’s good.
To the errors you’re showing; EAE errors are almost always associated with inotify table overflow (the table fills but EAE needs 2 slots per transcode)
Give this a shot.
If you don’t have enough media to even worry about it (e.g. less than 8192 folders) then I very much suspect you’ve been overflowing the NAS OS partition (/) itself – You could ‘brick’ it — leading to a complete reinstall of DSM. (your media would be safe but all apps would get wiped)
@ChuckPa before I remove Plex from Docker, can you clarify the following two parts of your post? I’ll comment inline. I have a feeling I can fix this in the volumes: section of my docker-compose, but maybe you can confirm?
Given your docker compose file is not using absolute pathnames, it’s uncertain what you’ve done as ./plex would normally be created as /./plex . The root (/) partition of all synology systems is only about 2.4 GB and will quickly overflow – creating problems.
The path for this container is /volume2/docker/plex on an NVMe volume. Were you thinking I had installed Plex in the system directory? With that context in mind, what specific local folders should I list in my Plex install folder?
If ./plex does end up as /volume1/./plex – that’s good.
This one I’m not sure about. I’m guessing it means you hope that’s what I did, since otherwise I might have installed it in something like /etc or /var, in which case my NAS is about to crash?
Just for clarity, here’s my complete docker-compose. Thanks!
It’s clear that /volume1/Media (shared folder Media) → /data in the container.
No idea where ./plex is on the host… to be used as /config in the container and used as /tmp in the container
This is scary stuff because you’ve not anchored it with an absolute path on /volume1 or other /volume. By default, DSM is going to assume /
Running as GID=100 (users) will not grant you access to HW transcoding if that’s something you want/need.
For containers I create, (example being one to run docker on DSM 7)
– which still requires the Plex native package installed in order to have HW transcoding privilege
This is a “docker run” sequence. Easily converted to a “docker compose”
I’m the kind of guy who likes pathnames to be full paths.
I don’t like relative pathnames in system-global configuration files.
If you changed ./plex → /volume2/docker/plex , which locks it down then I’d be more comfortable.
That said, if you’re all set with and have confirmed that – then I will back off.
I just don’t want you getting stuck in the position of dealing with a full root filesystem on DSM (pretty ugly stuff)
Using Docker is fine. The only question is whether or not you need HW transcoding ??
No problem. If someone installed an app in their system directory, that would be absolutely horrible.
I don’t need HW transcoding, so I took out the line you had for using the GPU. I added the following volumes with absolute paths (that was definitely my initial mistake):
It could always break again, but if I’m guessing, it is now fixed 100%.
I couldn’t play anything before either and now I can (and no console errors).
You’ll know far more Linux than me since I just started, but maybe this is what happened:
I migrated my install, running the docker-compose to build the container and then stopping it to copy in my old library, re-add my media, etc.
I did run a chown -R docker:users /path/to/plex (that’s the only user that has rights to docker) and also a chmod -R a=,a+rX,u+w,g+w /path/to/plex after that, but for an unknown reason, that did not work on the codecs folder.
The relative paths were a bad idea on my part, but not the cause (it was EasyAudioEncoder getting trapped in a folder with the wrong permissions).
I’m learning with Linux that if something doesn’t work, it’s: 1) something I did, and 2) something I did with permissions.
Thanks. Permissions have been the most confusing new area!
I thought this was fixed (I can play media and the console isn’t throwing errors), but now I have very high CPU use for Plex Transcoder, EasyAudioEncode and a few others. The console looks like this (I’d post the log but not sure which it is):
It’s late here, so I’m stopping the container so as to not thrash my CPU overnight. But, I’m now close to just installing the non-docker version of Plex on this NVMe!
A quick update. This morning I noticed you had written this. Based on your docker run example, I changed my /tmp and /transcode docker volumes to use the same folder in my Plex install directory (they had been separate):
Then, I gave my docker user execute permissions to everything in my Plex folder recursively (I’m still crappy with chmod, so I did that in Synology DSM) … and restarted the container. No more high CPU use.
Probably only the second part did anything, but this does seem to be fixed now. Thank you again! Hopefully this helps future docker users who struggle with volume mapping.
One note, I got those chown and chmod commands from the Trash guides for Synology. It’s not the place to note this, but I’ve had to do a lot of fixing after using those guides.
@ChuckPa this started happening again and has been maddening. I did do a chmod -R 755 on the Plex install folder (and deleted EasyAudioEncoder), but that actually made Plex unable to read the folder, so I had to revert it. I don’t know if that’s some kind of Synology issue.
Permissions look like this:
drwxrwxr-x 1 docker users 538 May 30 23:48 Cache
drwxrwxr-x 1 docker users 138 May 30 23:42 Codecs
drwxrwxr-x 1 docker users 156 May 23 20:19 'Crash Reports'
drwxrwxr-x 1 docker users 0 Dec 31 11:20 Diagnostics
drwxrwxr-x 1 docker users 80 Dec 31 11:20 Drivers
drwxrwxr-x 1 docker users 44 May 23 20:17 @eaDir
drwxrwxr-x 1 docker users 3390 May 30 23:53 Logs
drwxrwxr-x 1 docker users 18 Dec 31 02:55 Media
drwxrwxr-x 1 docker users 28 Dec 31 02:56 Metadata
-rw-rw-r-- 1 docker users 3 May 30 23:40 plexmediaserver.pid
drwxrwxr-x 1 docker users 0 Dec 31 02:45 Plug-ins
drwxrwxr-x 1 docker users 100 Dec 31 02:46 'Plug-in Support'
-rw-rw-r-- 1 1000 1000 1089 May 30 23:40 Preferences.xml
drwxrwxr-x 1 docker users 34 Dec 31 14:35 Scanners
-rw-rw-r-- 1 1000 1000 12330 May 30 23:40 'Setup Plex.html'
drwxrwxr-x 1 docker users 0 Dec 31 02:45 Updates
As I mentioned, the docker:users setup comes from this guide.
@ChuckPa many thanks. The 1000 permissions on those files must have been the result of a typo. It was late for me and I didn’t notice. Ugh.
Updates as follows.
Clarification:PUID = 1028 is the UID of the docker user, which can only access /volume2/docker and my media share.
Updates: I did your above and had the issue where the Plex container starts, but Plex won’t run.
Aaaand… I had misunderstood that. Plex was failing with this: Read/write access is required for path: /config/Library/Application Support/Plex Media Server but that’s a docker path. So I deleted the container and ran docker-compose again. Now that works and there are no more EAE issues.
I do have /dev/dri, which contains card0 and renderD128. The permissions are:
drwxr-xr-x 2 root root 80 May 29 23:26 .
drwxr-xr-x 15 root root 14520 May 29 23:26 ..
crw------- 1 root root 226, 0 May 29 23:26 card0
crw-rw---- 1 root videodriver 226, 128 May 29 23:26 renderD1288
Let me know if I should add anything to allow hardware transcoding to work.
Should open /etc/group in vim? If so, there’s no line containing videodriver. Should I add it?
Also, I did nothing to the Plex folder, but the container became unhealthy and took down my NAS. I stopped the container and deleted it, gave /plex 755 and 644 again, deleted the codec, and built it again. And within 5 minutes it was maxing out EasyAudioEncode, Plex Transcoder, and Plex Media Fingerprinter like this whole thread never happened.
Plex in docker is on /volume2 (my NVMe drive) but that was thrashing my main volume. I’m attaching a console sample of what it was doing.
drwxr-xr-x 1 docker users 538 May 31 20:38 Cache
drwxr-xr-x 1 docker users 70 May 31 23:21 Codecs
drwxr-xr-x 1 docker users 156 May 23 20:19 'Crash Reports'
drwxr-xr-x 1 docker users 0 Dec 31 11:20 Diagnostics
drwxr-xr-x 1 docker users 80 Dec 31 11:20 Drivers
drwxr-xr-x 1 docker users 44 May 23 20:17 @eaDir
drwxr-xr-x 1 docker users 3390 May 31 08:35 Logs
drwxr-xr-x 1 docker users 18 Dec 31 02:55 Media
drwxr-xr-x 1 docker users 28 Dec 31 02:56 Metadata
-rw-r--r-- 1 docker users 3 May 31 08:35 plexmediaserver.pid
drwxr-xr-x 1 docker users 0 Dec 31 02:45 Plug-ins
drwxr-xr-x 1 docker users 100 Dec 31 02:46 'Plug-in Support'
-rw-r--r-- 1 docker users 1089 May 31 08:35 Preferences.xml
drwxr-xr-x 1 docker users 34 Dec 31 14:35 Scanners
-rw-r--r-- 1 docker users 12330 May 31 08:35 'Setup Plex.html'
drwxr-xr-x 1 docker users 0 Dec 31 02:45 Updates
All in all, this is now one of the ten most frustrating tech problems I’ve ever had and that includes Windows 98 bluescreens.
I’ve given an absolute ton of contextual info in this thread and you’ve been so, so patient, but I’m getting ready to give up on the idea of ever running Plex in Docker.
Also, FYI, that log you grabbed doesn’t contain anything useful.
When you say EAE was maxing out, do you mean your Plex logs are filled with No space left on device as PMS starts --OR-- EAE complains of “Wrong folder?”
This issue manifests as PMS killing my CPU when I am not watching anything by repeatedly running EasyAudioEncode, Plex Transcoder, and Plex Media Fingerprinter. I have a running processes widget where I can watch that happen.
By “EAE was maxing out” I mean DSM stopped responding. I had to restart the NAS.
By “container becomes unhealthy” this is probably clear enough. In Container Manager, the volume is orange and a message that it’s unhealthy appears.
Since it’s this issue, today I can’t recreate it. I can watch stuff, idle, whatever, it’s all fine.
I prefer not to attach logs with my username and other stuff to a public thread but can DM you. But, your DMs are disabled.
At this point, if I don’t hear anything and this happens one more time, I’m just going to remove Plex from Docker and take it as a lesson learned.