After switching to Plex Pass PMS is constantly utilizing one core (version 1.14.1.5488)

Server Version#: Version 1.14.1.5488
Player Version#:
Synology: DS918+ (DSM 6.2.1-23824 Update 1)

Yesterday I purchased Plex Pass (to have hardware transcoding) and after the upgrade I noticed that Plex Media Server is constantly loading single CPU core (25% load on 4-core system). The load is constant. I’m not watching anything. I checked activity, transcoding and all other places but nothing happens. Video thumbnail generation is disabled, trailers are disabled.

The only critical error I’ve found is this one (com.plexapp.system.log):
CRITICAL (runtime:709) - Private handlers are no longer supported; couldn’t register <bound method StreamService.token_handler of <streamservice.StreamService object at 0x7f6ad91a94d0>>

CPU utilization:

CPU utilization chart from last week (purchase/upgrade happened yesterday, 12/19)

Plex log files sorted by date (almost no activity):

Do you have any suggestions what may utilize CPU constantly while all the clients are idle?

Ok, regarding 4k movies I’ll start separate thread.

Any hints about CPU utilization (it’s still at 25% of totatl = 100% of single core for 1.5 days)?

I’ve just completed update of Synology DSM to DSM 6.2.1-23824 Update 2, shares are still encrypted after reboot and Plex Media Server is constantly utilizing that single core to the maximum.

I wish people read my replies as well. I wrote specifically that after reboot all shares were not mounted which means Plex had nothing to index. There were no clients playing anything (due to same reason - reboot and no physical access to medias!) and right from the start Plex Media Server is utilizing single core at 100%. Currently it’s doing so for 60 hours.

Would you mind doing the following?

  1. Enable SSH (Control Panel - Terminal & SNMP)
  2. Enable the Admin user account (if you previously disabled it)
  3. Make certain you have the admin password handy.
  4. Putty or ssh to the IP of your Syno as user admin
  5. Once logged in, please type:
ps -ef | grep -i plex
  1. Wait 15 seconds and repeat it.
  2. Copy/paste both blocks of output text and paste them into your reply here.
  3. Open the Synology Resource Monitor - Task Manager - Processes tab and screenshot it.
  4. Lastly, please pull the log files (Settings - Server - Troubleshooting - Download Logs) and attach the ZIP file in the same post.

With these three, it should be pretty clear what is running wild.
I’ve not seen this before but we will find out.

Sure, I’m attaching requested data and logs (re-collected shortly after restart) - but there’s really nothing in there (I redacted some obvious PII data)

Screenshot:

Logs:
Plex Media Server Logs_2018-12-22_00-44-39.zip (9.1 KB)

Results of asked commands:
commands.txt (5.3 KB)

10 measurements every 1s for PID with highest CPU utilization
top_pid_10_measurments.txt (1.2 KB)

Please forget 4k problem ATM. There are no longer any 4k movies anywhere in Plex’s range as well as in the library (I removed those, emptied trash and cleaned up the bundles) - I did that 2 days ago.

Constant CPU utilization is unrelated to playing any content. Regarding watch - Plex is unable to install watcher for those directories (those are some subfolders of whole media library) - but can play their content that was indexed before (if mounted).
I think I tried all possibile combinations:

  1. Reboot of the whole system, Plex server starts up and has no access to any media folders as they are encrypted.
  2. All media folders are within Plex’s range, Plex server restarted, there’re no active clients.
  3. Same as 2. but I played some content from the library - I don’t see any change in CPU utilization in comparison to “idle” Plex. It’s still 100% CPU of single core.

My only question is why Plex is constantly utilizing CPU when it’s supposed to be idling. And why situation changed only after installing recent Plex server update and account upgrade to Plex Pass - previously I had no such problems.

You have clear problem with understanding simple statements. Since beginning - including subject the post it’s about constant CPU utilization with/without any load. It was my bad that unfortunately in first post I mentioned I have 2 separate and unrelated problems and I stated that I’ll open another issue for 4k playback (once general CPU utilization will be resolved). If possible, could you please forward my case to someone more competent? I can get back to you with full logs from 4k playback if you’re transcoding expert, but first I have to solve this CPU problem.

FYI I removed reference to 4k playback from my initial post as it’s unrelated and all the data I provided since my first post has nothing to do with 4k playback.

So can someone help investigate this 100% utilization of one core by Plex Media Server while there’s no active clients - as it’s been more than 72h already and nothing helps? Right now I’m about to try to find and install some older version (I’m using Plex for months and I haven’t had any problems like that ever).

If I may augment here?

I think I see what’s happening:

Failing to add the iNotify watch is completely different than actual permissions.

The errors seen in the log file are because the unprivileged user plex does not have permission to expand the Notification table size when the table is full. Linux default is to allow 8192 directories to be watched.

The latest update of DSM seems to impact PMS file locking when this table overflows. I have not had time yet to investigate this thoroughly but empirical evidence is convincing.

To that end, the easiest remedy is to manually expand the size of the table and then restart PMS.

To do this, we need the total number of directories, inclusive of all subdirectories, to be watched by PMS.

Using /volume1/media as the example, the SSH command line sequence, after using Putty or SSH to sign into the Synology as user admin will be:

sudo -su root
find /volume1/media -type d -print | wc -l

This will give us the exact number of directories currently existing.
We now round this up to the next integral value of 32768 (32K). If you know you will be adding a lot of media, it is completely safe to increase pad by 64K provided you have > 4GB of RAM in the system.

(Notification watches are 540 bytes each. Allocating 1,000,000 watches would consume 540MB of memory. This is very detrimental in most cases)

Assume the find command above returns 101,763 (purely an example)
We round this up to 131072 (128K)

Now we tell the kernel to increase the table size to 131072.

echo  fs.inotify.max_user_watches=131072 >> /etc/sysctl.conf
sysctl -p

fs.inotify.max_user_watches is the kernel variable we’re increasing
sysctl -p command tells the kernel to re-read sysctl.conf and make all table sizes as indicated there.
(Linux automatically reads this table with each boot so manual table setting needs only be done once)

Now restart PMS.
The iNotify errors will be completely gone if all directories have been accounted for. If not, the logs will show where the table filled up.

The full procedure is here:

I’ve just downgraded Plex Media Server to Version 1.13.8.5395 and CPU utilization problem doesn’t occur anymore.

@ChuckPa - thanks for looking into the problem and all the hints. I’ve just checked and it’s not an issue here:
sh-4.3# find /volume1/media -type d -print | wc -l
2801

I also checked what’s my current value:
fs.inotify.max_user_watches = 8192

Interestingly now (with version 1.13.8.5395) I see more Plex-related processes (in my previous posts there’s output for version 1.14) but it could be related to re-indexing all files (although Plex Library share was untouched during downgrade - I had to uninstall current version and install older, as installing older version over newer is not possible).

top-1.13.8.5395.txt (1.5 KB)

See how CPU utilization dropped the moment I did downgrade:
cpu-after-downgrade

If that’s what’s happening then there’s unfortunately nothing I can do until after Engineering is back.

Sorry :man_shrugging:

Looks like new version was causing the issue. Here’s chart after almost 24 hours after downgrade:

Hi, I’m having the same issue. Where can I download the older version of PMS?

(FYI, PMS version 1.14.1.5488 running on XPEnology 6.2-23739 Update 2 on an HP Microserver Gen8 with 4GB RAM and 2.3GHz Ivybridge G1610T CPU. 1 CPU core constantly running at 100% utilisation with a ‘plex media server process’)

@gary_parker don’t think you can. I was lucky as I’m keeping last few versions of packages I’m installing. If support is not able to provide you older version, and you think the packages are fully compatible I can try to share version I have.

@ChuckPa - do we have any estimates when Engineering is coming back?

Cheers buddy, I think I’ll wait for a new release to (hopefully) fix the problem.

Last time this happened it was constant reindexing of music folders. I never use Plex for music so I deleted the library and it’s still pegging that one core at 100%.

Just popped that beta build on and I’m seeing the same behaviour: one core constantly fully utilised by a “Plex Media Server” process. As I’ve only got a dual core system (G1610T) that means it’s running at a minimum of 50% utilisation permanently.

Time passes…

However, I’ve also noted that’s it’s started generating video preview thumbnails, which it wasn’t doing before, so maybe it was getting hung up starting doing this and is now performing properly?

edit

Thumbnail processing has stopped now and it’s still using 50% CPU basically doing nothing…

Just updated to 1.15.0.573 and am still seeing the same behaviour.

Hi! I’m having the same issue for the past 4 weeks now, since last update. One of my 4 cores is stuck at 100%, and it’s the Plex Media Server process that is stuck.
Similar to OP, I run Plex on my Synology, but within a Docker container, and only for DVR. By that I mean that no playbacks are initiated from that server, only DVR content being captured/recorded. I was hoping to see an update being pushed out shortly, but I understand that holiday vacations can stop developpement for a bit.

Basically, I just wanted to point out that I was also having the same issue.
Synology DS916+ 8GB with PMS (Plex Pass) running inside Docker.

1 Like

Okay, sorted it on my system after rolling back to a previous version (1.14.0.5470). I was a little worried that I’d lose all my library settings by uninstalling and reinstalling, but I’m pleased to say everything was retained. Plex don’t provide older versions of the install packages, but if you Google for “PlexMediaServer-1.14.0.5470-9d51fdfaa-x86_64.spk” it shouldn’t take you long to find (a helpful soul seems to keep an archive of the Synology packages, they’re cryptographically signed so should be safe to install). Installing the older package needed no configuration at all, everything sprang straight into life and I’m no longer seeing the 100% utilisation on one core.

edit I’ve observed a 10℃ drop in the RAM and voltage regulator temps and an average 15℃ drop on the CPU cores since then. Job done!

I would like to know how one monitors the RAM and VRM temps in a Synology. Synology does not provide such instrumentation to the general public in any of its production products based on my last briefing with them.