Plex Media Server using a full CPU core while idle

I'm running the most recent release of Plex Media Server (0.9.10.1.585-f31034e) on my windows 8.1 media server and whenever plex is running for more than a few hours the cpu usage of plex and python both consume 25%, so 50% combined.
 
For the sake of troubleshooting I've disabled just about every setting in PMS. Library updating is completely disabled, all of the channels are disabled, DLNA is disabled, generating media index files is disabled, and I didn't access plex from the web, chromecast, or any android device.
 
I have also tried a fresh install of plex and have now removed all of my libraries from plex. So, there is literally no media in plex with no one accessing it and it still shows runaway cpu usage after about 3 hours or running. I've left the machine running for a weekend and after 48 hours it still shows a full core of idle cpu usage.
 
The machine is running a quad core 3.9ghz AMD A8-6600K with 8gb of ram and when plex first runs there is almost no cpu usage. Updating the few libraries I had took less than a second and even with the runaway cpu usage plex was still completely responsive. I could still navigate the web and android interfaces and transcode media to the chromecast, albeit a little choppy.
 
I've attached the log with all logging enabled for the entire 3 hours until it started showing runaway cpu usage, then I stopped it after about 30 minutes. Since DLNA and the library scanner are disabled there were no logs from either during this run. I've also attached a screenshot of the task manager, just for clarity of what is happening.
 
I'm completely at a loss for what could be causing this problem and I'm open to any suggestions from you guys.
Thanks!
 
Plex Media Server.log (298 KB)
![post-277424-0-31926100-1412272491.png|690x202](upload://s8bKSsYEFE4dekhNZJnGIXPVxgi.png)

That heavy CPU usage is symptomatic of Plex creating index files. Depending on how large your library is it can take as much as a week or more to get all the indexes created. I have over 1000 movies and over 3000 TV episodes and on initial setup it took over 10 days running 24/7 to get the indexes finished.

During that time Plex was also streaming quite a bit and worked fine.

There are two places in the server settings where indexes are controlled:

1. Settings-Server-Advanced-Library-Generate media index files during scans (on/off)

2.  Settings-Server-Advanced-Scheduled Tasks (There you can control when tasks like indexing run) I had this set to 24/7 until the first round of indexing was complete and now it is set to run for about 6 hours every morning.

Hope that helps a bit.

Now that I reread your post I see that you have library scans disabled so this is probably not the problem but I will leave this here just in case.

Library updating is completely disabled, all of the channels are disabled, DLNA is disabled, generating media index files is disabled, and I didn't access plex from the web, chromecast, or any android device.
 
I have also tried a fresh install of plex and have now removed all of my libraries from plex. So, there is literally no media in plex with no one accessing it and it still shows runaway cpu usage after about 3 hours or running.

I disabled index file creation both in the libraries tab and in the scheduled tasks tab and have the same problem. I've also ran PMS with no libraries at all. So 0 media files and I still have this problem.

I should also note that PMS runs fine for a few hours before using a ton of cpu.

Sorry for any confusion

I disabled index file creation both in the libraries tab and in the scheduled tasks tab and have the same problem. I've also ran PMS with no libraries at all. So 0 media files and I still have this problem.

I should also note that PMS runs fine for a few hours before using a ton of cpu.

Sorry for any confusion

No confusion just old eyes and old brain poorly reading your post the first time through. I read what I thought it said rather than what it actually said.

At this point I really have no idea what could be causing your problem but it really sounds abnormal. My server never spikes above 70% even when transcoding one stream and scanning libraries at the same time. Most of the time it runs at less than 2% when Plex is running but idle and 10% when streaming. 

Not a problem. That's honestly why I posted here. There are a lot of similar problems with high CPU usage, but none with an empty library and while idle.

I'm really hoping a Dev or someone with much more insight into how plex works can take a look at the logs and shed any insight into what's happening and how I can try to fix it.

I’m thinking you got a bad installation, maybe from a bad download, so plex trying to update bundles but can’t so its running in a loop.

With verbose debug logging on the server and zip of C:\Users\super_000\AppData\Local\Plex Media Server\Logs\PMS Plugin Logs folder and Plex Media Server.log and identifying the exact time when the cpu usage task manager screenshot taken ought to help see what was going on

As last resort i would run SysInternals ProcMon.exe at the time to look for extra clues

Exact same problem. Will upload logs also.

Any updates on this? I am having the same problem - Plex is chewing up a full core at all times. Amount of load or activity does not seem to matter. I am running Plex Media Server 0.9.11.1.678

I've run into this same problem this evening, where the Plex Media Server.exe process is pegging one of my CPU cores. (Quad-core AMD Athlon II X4 640 in case it's relevant.) I'm running the Windows 10 tech preview, but Plex did this once before on a Windows 7 install a while back. I don't remember what I did to fix it then, I think I did a fresh install or something. I had some spare time this evening so I did some digging instead of doing a wipe and reinstall.

Process Explorer has a view that can show a process's CPU usage by thread, and I think that this screenshot should be pretty clear:

Process Monitor looks like this:

It repeats this set of events over and over, about once every few seconds. There's no regular activity other than these events. "Stibbons" is the name of the system that Plex is installed and running on. I can provide better logs if needed but I'd like to know what sort of procmon output is preferred (file format, filters, etc).

I don't know if the "TLS" in "get_tlsindex" is Transport Layer Security or Thread Local Storage (I suspect the latter) but maybe this can be a hint in the right direction?

So all this CPU usage with no file I/O involved by pms ?

So all this CPU usage with no file I/O involved by pms ?

That's what it looks like. It appears that a thread is losing its mind when trying to access its local storage and then starts eating up all of the CPU that it can grab, without hitting the disk at all. But I'm not really a developer so I'm just guessing.

Is there a way for me to upload a debug log so that the Plex people can see it, but not the other forum users? I'm new to this style of forums. If I need to send something by a private message I can do that instead.

Only if member of the plex team asks you.


You could edit log files removing email account, public IP address and any access tokens not already obfuscated .


You could also dump the process when in this state - but would really need plex team to be involved

Turns out that debug logging was already on. I just restarted Plex and waited for the CPU to start spiking. Here's the last part of the current log, and 4:25 local was exactly when the CPU usage spiked so it's right at the correct point:

Nov 03, 2014 04:25:11:056 [3220] DEBUG - Butler: Waking up!

Nov 03, 2014 04:25:11:056 [4112] DEBUG - Butler: Starting task CheckForUpdates
Nov 03, 2014 04:25:11:056 [4112] DEBUG - AutoUpdate: requesting check endpoint: /updater/products/1/check.xml?build=windows-i386&channel=16&distribution=english&version=0.9.11.1.678-c48ffd2
Nov 03, 2014 04:25:11:409 [4112] INFO - AutoUpdate: no updates available
Nov 03, 2014 04:25:11:409 [4112] DEBUG - Butler: Completed task CheckForUpdates in 0.4 seconds.
Nov 03, 2014 04:25:11:409 [4112] DEBUG - Butler: Starting task BackupDatabase
Nov 03, 2014 04:25:16:429 [4112] DEBUG - Butler: backed up your database.
Nov 03, 2014 04:25:16:429 [4112] DEBUG - Butler: Completed task BackupDatabase in 5.0 seconds.
Nov 03, 2014 04:25:16:429 [4112] DEBUG - Butler: Starting task UpgradeMediaAnalysis
Nov 03, 2014 04:25:28:593 [4112] DEBUG - Job running: C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe --analyze --no-thumbs --item 2336,2484,2247,2310 
Nov 03, 2014 04:25:29:203 [0692] DEBUG - Request: [127.0.0.1:55611] GET /:/metadata/flushMetadataCounterCache (3 live)

"Plex Media Scanner.exe" is, interestingly, not running. The CPU usage is in "Plex Media Server.exe" just as in the earlier screenshot, with the same "MSVCR120.dll!__get_tlsindex+0x6" thread pegging one of the CPU cores.

I have "Generate media index files during scans" in the advanced Library settings disabled, and "Generate missing media index files during maintenance" in the advanced Scheduled Tasks is also disabled. "Upgrade media analysis during maintenance" is enabled in advanced Scheduled Tasks, which I think may be important.

While I was writing this, the log was updated with this:

Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Updating mapping in puncher thread 04386B68

Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Creating puncher.
Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Switching to NAT-PMP strategy.
Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Creating NATPmPPuncher.
Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Initializing NAT-PMP, success=1
Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Finding public address failed the first way, switching.
Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Switching to UPnP strategy.
Nov 03, 2014 04:30:14:584 [6508] DEBUG - NAT: Creating NATUPnPPuncher.
Nov 03, 2014 04:30:17:595 [6508] DEBUG - NAT: Initialized UPnP, result: SUCCESS
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Requested public address via UPnP (success=1)
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Obtained public address of 68.203.3.133 (failed: 0 myPlex: 0).
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Checking for change in address: old was 68.203.3.133 and new is 68.203.3.133.
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Mapping unchanged.
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Updating mapping complete in thread 04386B68.
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Deleting puncher.
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Deleting NATUPnPPuncher.
Nov 03, 2014 04:30:17:610 [6508] DEBUG - NAT: Deleting NATPmPPuncher.
Nov 03, 2014 04:30:51:055 [5700] DEBUG - Request: [192.168.1.135:55787] OPTIONS /accounts/1 (3 live)
Nov 03, 2014 04:30:51:103 [6676] DEBUG - Request: [192.168.1.135:55788] OPTIONS /myplex/account (3 live)
Nov 03, 2014 04:30:51:121 [5700] DEBUG - Request: [192.168.1.135:55789] OPTIONS /system/agents?mediaType=1 (3 live)
Nov 03, 2014 04:30:51:121 [5700] DEBUG -  * mediaType => 1
Nov 03, 2014 04:30:51:159 [6676] DEBUG - Request: [192.168.1.135:55790] GET /accounts/1 (4 live)
Nov 03, 2014 04:30:51:159 [5700] DEBUG - Request: [192.168.1.135:55791] GET /myplex/account (4 live)
Nov 03, 2014 04:30:51:159 [5700] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:159 [5700] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:160 [6676] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:160 [6676] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:161 [6676] DEBUG - It took 0.000000 sec to serialize a list with 1 elements.
Nov 03, 2014 04:30:51:166 [5484] DEBUG - Request: [192.168.1.135:55792] GET /system/agents?mediaType=1 (5 live)
Nov 03, 2014 04:30:51:166 [5484] DEBUG -  * mediaType => 1
Nov 03, 2014 04:30:51:166 [5484] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:167 [5484] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:167 [5484] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents?mediaType=1
Nov 03, 2014 04:30:51:168 [5484] DEBUG - HTTP requesting to: http://127.0.0.1:55233/system/agents?mediaType=1
Nov 03, 2014 04:30:51:189 [5484] DEBUG - [com.plexapp.system] HTTP reply status 304, with 0 bytes of content.
Nov 03, 2014 04:30:51:238 [7080] DEBUG - Request: [192.168.1.135:55794] GET /myplex/account (5 live)
Nov 03, 2014 04:30:51:238 [7080] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:238 [7080] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:295 [6676] DEBUG - Request: [192.168.1.135:55796] OPTIONS /system/agents/contributors?mediaType=1&primaryAgent=com.plexapp.agents.none (6 live)
Nov 03, 2014 04:30:51:295 [6676] DEBUG -  * mediaType => 1
Nov 03, 2014 04:30:51:296 [6676] DEBUG -  * primaryAgent => com.plexapp.agents.none
Nov 03, 2014 04:30:51:299 [5700] DEBUG - Request: [192.168.1.135:55795] OPTIONS /system/agents/com.plexapp.agents.none/config/1 (6 live)
Nov 03, 2014 04:30:51:313 [6676] DEBUG - Request: [192.168.1.135:55798] GET /system/agents/com.plexapp.agents.none/config/1 (6 live)
Nov 03, 2014 04:30:51:313 [6676] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:313 [6676] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:314 [6676] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents/com.plexapp.agents.none/config/1
Nov 03, 2014 04:30:51:316 [6676] DEBUG - HTTP requesting to: http://127.0.0.1:55233/system/agents/com.plexapp.agents.none/config/1
Nov 03, 2014 04:30:51:322 [5484] DEBUG - Request: [192.168.1.135:55797] GET /system/agents/contributors?mediaType=1&primaryAgent=com.plexapp.agents.none (5 live)
Nov 03, 2014 04:30:51:322 [5484] DEBUG -  * mediaType => 1
Nov 03, 2014 04:30:51:322 [5484] DEBUG -  * primaryAgent => com.plexapp.agents.none
Nov 03, 2014 04:30:51:322 [5484] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:322 [5484] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:322 [5484] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents/contributors?mediaType=1&primaryAgent=com.plexapp.agents.none
Nov 03, 2014 04:30:51:354 [6676] DEBUG - [com.plexapp.system] HTTP reply status 304, with 0 bytes of content.
Nov 03, 2014 04:30:51:361 [5484] DEBUG - [com.plexapp.system] HTTP reply status 304, with 0 bytes of content.
Nov 03, 2014 04:30:51:388 [6676] DEBUG - Request: [192.168.1.135:55802] OPTIONS /system/agents/attribution?identifier=com.plexapp.agents.none (6 live)
Nov 03, 2014 04:30:51:388 [6676] DEBUG -  * identifier => com.plexapp.agents.none
Nov 03, 2014 04:30:51:397 [7080] DEBUG - Request: [192.168.1.135:55801] OPTIONS /system/agents/attribution?identifier=com.plexapp.agents.localmedia (5 live)
Nov 03, 2014 04:30:51:397 [7080] DEBUG -  * identifier => com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:407 [5700] DEBUG - Request: [192.168.1.135:55804] OPTIONS /system/agents/attribution?identifier=com.plexapp.agents.localmedia (5 live)
Nov 03, 2014 04:30:51:407 [5700] DEBUG -  * identifier => com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:419 [6676] DEBUG - Request: [192.168.1.135:55805] GET /system/agents/attribution?identifier=com.plexapp.agents.none (6 live)
Nov 03, 2014 04:30:51:419 [6676] DEBUG -  * identifier => com.plexapp.agents.none
Nov 03, 2014 04:30:51:419 [6676] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:419 [6676] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:420 [6676] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents/attribution?identifier=com.plexapp.agents.none
Nov 03, 2014 04:30:51:420 [6676] DEBUG - HTTP requesting to: http://127.0.0.1:55233/system/agents/attribution?identifier=com.plexapp.agents.none
Nov 03, 2014 04:30:51:424 [5484] DEBUG - Request: [192.168.1.135:55807] GET /system/agents/attribution?identifier=com.plexapp.agents.localmedia (5 live)
Nov 03, 2014 04:30:51:424 [5484] DEBUG -  * identifier => com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:424 [5484] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:425 [5484] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:425 [5484] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents/attribution?identifier=com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:427 [5484] DEBUG - HTTP requesting to: http://127.0.0.1:55233/system/agents/attribution?identifier=com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:462 [6676] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content.
Nov 03, 2014 04:30:51:474 [5484] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content.
Nov 03, 2014 04:30:51:493 [7080] DEBUG - Request: [192.168.1.135:55809] GET /system/agents/attribution?identifier=com.plexapp.agents.localmedia (5 live)
Nov 03, 2014 04:30:51:493 [7080] DEBUG -  * identifier => com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:493 [7080] DEBUG - We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Nov 03, 2014 04:30:51:493 [7080] DEBUG - Came in with a super-token, authorization succeeded.
Nov 03, 2014 04:30:51:493 [7080] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents/attribution?identifier=com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:494 [7080] DEBUG - HTTP requesting to: http://127.0.0.1:55233/system/agents/attribution?identifier=com.plexapp.agents.localmedia
Nov 03, 2014 04:30:51:518 [7080] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content.

However, the CPU was already pegged for about five minutes before any of this was logged, and none of it seems to be relevant.

My wild-ass theory: there's a log statement that says "Butler: Starting task UpgradeMediaAnalysis", which coincides with "Job running: C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe --analyze --no-thumbs --item 2336,2484,2247,2310 ". It's pretty clear that the media scanner is run as part of that task. However, unlike the other Butler tasks, there's no corresponding "Completed tasks" log statement for UpgradeMediaAnalysis.

My guess (and it's just a guess) is that the "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe --analyze --no-thumbs --item 2336,2484,2247,2310" job is not getting launched properly, since there's no such process running, and the associated thread in "Plex Media Server.exe" goes haywire and starts eating up CPU.

I'm going to test this by disabling "Upgrade media analysis during maintenance" in the advanced Scheduled Tasks settings, killing and restarting Plex, and seeing if the same thing happens.

[edit] Also of note, when I try to stop Plex Media Server through the tray icon, it does not actually stop. I have to kill the process manually in the Task Manager or Process Explorer or something. If I do it through Process Explorer, the same thread is still pegging a CPU core even though the main process appears to be shut down.

That looks like it did it. New log:

Nov 03, 2014 04:56:12:545 [3240] DEBUG - Butler: Waking up!

Nov 03, 2014 04:56:12:545 [3596] DEBUG - Butler: Starting task CheckForUpdates
Nov 03, 2014 04:56:12:545 [3596] DEBUG - AutoUpdate: requesting check endpoint: /updater/products/1/check.xml?build=windows-i386&channel=16&distribution=english&version=0.9.11.1.678-c48ffd2
Nov 03, 2014 04:56:12:901 [3596] INFO - AutoUpdate: no updates available
Nov 03, 2014 04:56:12:901 [3596] DEBUG - Butler: Completed task CheckForUpdates in 0.4 seconds.
Nov 03, 2014 04:56:12:901 [3596] DEBUG - Butler: Starting task BackupDatabase
Nov 03, 2014 04:56:17:753 [3596] DEBUG - Butler: backed up your database.
Nov 03, 2014 04:56:17:753 [3596] DEBUG - Butler: Completed task BackupDatabase in 4.9 seconds.
Nov 03, 2014 04:56:17:753 [3596] DEBUG - Butler: Starting task RefreshLocalMedia
 
[big mess of stuff deleted]
 
Nov 03, 2014 04:56:25:084 [3596] DEBUG - Butler: refreshed 7 items.
Nov 03, 2014 04:56:25:100 [3596] DEBUG - Butler: Completed task RefreshLocalMedia in 7.3 seconds.

The last time Butler (which I assume is a maintenance system) never even got to the RefreshLocalMedia task, it got wedged on "UpgradeMediaAnalysis". And I'm not seeing any CPU problems, and there's no wedged threads in Process Explorer.

If I run "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe --analyze --no-thumbs --item 2336,2484,2247,2310" manually in a command prompt from within the Plex Media Server folder, I get the following:

GUI: Media analysis on [REDACTED] S01 E07

GUI:
GUI: Media analysis on [REDACTED] S01 E26

and the process appears to finish properly. I have no idea if this means anything at all.

I'm going to leave "Upgrade media analysis during maintenance" disabled for the time being. If there's any other information I can provide to figure out exactly what's going on, let me know and I'll do my best.

Unticked that box and seems to be keeping things under control for me as well. I'll monitor the situation and report back if it starts acting up again.

On a side note, what exactly does that option do? I can't seem to find a detailed description of that function.

Unticked that box and seems to be keeping things under control for me as well. I'll monitor the situation and report back if it starts acting up again.

On a side note, what exactly does that option do? I can't seem to find a detailed description of that function.

https://support.plex.tv/hc/en-us/articles/201553286-Scheduled-Tasks

We do extensive media analysis on every file to ensure correct playback across the huge range of devices and apps. Occasionally we fix a bug in media analysis, or update things to capture some additional data. Similar to local metadata, this is computed on the fly when needed, but it can add a delay when selecting an item. This task ensures analysis is always up to date. 

I'm also having this issue on Windows, 0.9.11.0.

Add me on to this list too... (for having this problem)  Windows 7, 0.9.11.1

I'm running 0.9.11.1.678-c48ffd2 and have had a similar experience to that of brokenlibrarian's.  That is:

  • Plex Media Server starts burning a core shortly after startup
  • The UpgradeMediaAnalysis job kicks off but never finishes
  • Manually running the same cmd line for Plex Media Scanner appears to run without issue
  • When in this state exiting via the tray icon kills the child processes, but Plex Media Server.exe remains and must be killed manually.
  • Disabling "Upgrade media analysis during maintenance" fixes the issue.

Please let me know if I can provide any further information/logs.