Plex Server Showing Spikey CPU Usage

Server Version#: 1.32.8.7639
Player Version#: 1.84.1.4069-ff740b6d
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

Plex Amp shows strange spikey CPU usage on the server. I can hear the NAS really chugging away. When this is happening accessing anything on Plex is extremely slow. Other than that, Plex isn’t doing anything. It’s not playing anything, recording anything, nor is it detecting credits or updating any libraries. It does not look like normal high usage anyway. As mentioned, it’s very spikey. Restarting Plex does solve the problem but it comes back at seemingly random intervals. Sometimes an hour later, sometimes not for days.

Can you provide server DEBUG logs ZIP which capture this happening?

It’s not possible to diagnose from a description

When it does it again (which will be soon), I will do just that. Thank you.

Hi Chuck,

I hope I have the correct logs for you. Here they are. Thank you for your assistance.

William
Plex Media Server Logs_2024-01-14_15-19-29.zip (4.5 MB)

@wwoolrich

OH MY! “Lucy, you got some splainin’ to do!” :slight_smile:

Could not read ‘/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp/pms-e447d2ab-37ca-4034-999f-4a546825de6f/EasyAudioEncoder/Convert to WAV (to 8ch or less)/0deee64e-38f2-4e03-8cab-48f606e21b83_5970-0-3443.wav’
Jan 14, 2024 15:17:21.001 [140624016137016] ERROR - [Req#2a8b5d/Transcode/0deee64e-38f2-4e03-8cab-48f606e21b83/5b1ba2b9-0826-408e-9c5b-3f0c24d38a3f] [eac3_eae @ 0x7ff1eda8a5c0] error reading output: -5 (I/O error)
Jan 14, 2024 15:17:21.002 [140624035969848] ERROR - [Req#2a8b5e/Transcode/0deee64e-38f2-4e03-8cab-48f606e21b83/5b1ba2b9-0826-408e-9c5b-3f0c24d38a3f] Error while decoding stream #0:1: I/O error
Jan 14, 2024 15:17:26.000 [140624011918136] ERROR - [Req#2a8b5f/Transcode/0deee64e-38f2-4e03-8cab-48f606e21b83/5b1ba2b9-0826-408e-9c5b-3f0c24d38a3f] [eac3_eae @ 0x7ff1eda8a5c0] EAE timeout! EAE not running, or wrong folder?

Background info

  1. Plex uses the ‘inotify’ kernel feature when transcoding Dolby. This is our only interface to their program (Dolby provided).

  2. On Synology, by default, DSM provides us with up to 65536 inotify-watchable folders.

  3. The error we see above occurs when that table fills (overflows) and there’s nothing left for the transcoder and EAE to use.

  4. The possible root causes are:

  • A lot of properly curated media (music is a common cause) and having simply overflowed the default table size

  • Accidentally pointing Plex at the wrong folders to monitor / search for media.

  • Placing media anywhere in the PlexMediaServer shared folder is primary cause and why there are warnings in 6 different languages

  • Accidentally making a typo when creating a library section where PMS tries to index the entire Syno or entire Volume.

  1. One of these is the cause. The task now is to figure out and correct it.

If you’re certain, and have double checked, that no media is misplaced and that all section folder pathnames are correct, then we will figure out how many folders we need to tell DSM to allow us to monitor and adjust the table size to match.

Here is the FAQ which tells you how to do this.

If you have ANY questions, please don’t hesitate to ask.

Thanks, Chuck. Not all of that made sense to me :slight_smile: but I understand your listed root causes. I wonder if this might be my fault. I was trying hard to recognise new photos that were added via Synology Photos and followed these instructions to create a symbolic link to my Photos directory. I’m guessing this might have caused the problem? (this was months and months ago, BTW. At the time, it seemed to work, kinda)

mkdir /volume2/share/music
sudo mount --bind /volume1/music /volume2/share/music

oh no. you don’t do that with Plex on Synology. (Shouldn’t do it anywhere unless you are really familiar with bind mounts & symlinks)

There is no limit to the number of folders you can add to a library section.

For your Music library section

  1. Add folder /volume1/music
  2. Add folder /volume2/share/music

Problem solved.

Symbolic links are dangerous on Synology. DSM doesn’t account for them in the GUI. Plex will blindly run off the end and, if you’ve done it incorrectly, you’ll get an infinite loop (which now seems likely given the default inotify table will hold 65536 directories (folders))

Bind mounts are completely invisible to even the Filesystem once mounted.
Only the kernel keeps track of it.
You have to know how to find them and what to do to undo them.

Here’s what my movie library looks like.
This applies to all library section types in Plex.

Thank you again, Chuck. I actually tried your suggestion unsuccessfully, which is why through some Googling I found that Forum that suggested the symlink.

At any rate, your response last night kind of put me into panic mode thinking I’d knackered my NAS because of my one foolish error (I actually lost some sleep over it). For the moment, I just deleted the Plex Photo library. It said it wouldn’t impact my media at all, and after checking, it all seems to be intact. I don’t really look at my photos through Plex anyway. This was just a nice to have, not a must have. Hopefully, this solves the problem? Thanks again!

One thing we all must be cautious of on these linux boxes, ESPECIALLY when we have perfectly curated media (photos and music are the biggest hitters)…

We have so many directories (Album artist / album / disc # / blah blah – is a big one ) we easily overflow.

The fix for that is simple:

  1. Use FileStation → Right Click the specific media folder → Properties
  2. It will count the number of folders in it
  3. Total all the folders used for all your media.
  4. If that number exceeds 65536 on Synology – we need to increase the table size.
    – If it’s close to that number, we should probably increase it now anyway while we’re thinking about it.

The process is simple. (You’ll need to re-run this after DSM updates… which is why I wrote it this way)

Thanks again, Chuck. PlexPhoto has nothing in it at all. Inside PlexPhoto was the symlink pointing to Photo which has just over 5000 folders in it. Everything seems to be working again, including automatic library scanning which had also stopped working recently. If you recall I’d just gone ahead and deleted the Plex Photo library. Since everything seems to be operating smoothly at the moment, I’m pretty tempted to leave well enough alone. Do you really think I should increase the number of possible folders?

I would do the folder count anyway.
If you’re really close to it then I’d consider increasing.

If not then don’t bother but do keep it in the back of your mind for “if later”

1 Like

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