Server Version#: 1.19.3.2843-e3c1f7bcd
Player Version#: 4.30.2 (This is the 127.0.0.1:32400/ Webpage.. is that what you call the Player?)
I installed the Plex Media Server several months ago, and added my video, music, and picture libraries to it. I have not added anything else to the install. NO additional Plugins or anything.. And I only use the Plex App on my Roku to watch my videos.
After a while I noticed that the Python (32bit) Process is constantly using about 17% of my CPU. This is constant all day. And I have no devices(Roku) connected to the server. I have googled this and not found any specific resolution. I’ve seen posts going back to 2014 with this issue.
I used Process Explorer (see pic) to try and see what exactly is doing this…? When I go to ‘Details’ for the Python process in the Windows 10 Task Manager it is the PlexScriptHost.exe. And when I look at that with the Process Explorer I am not sure what to do next.
Any Help on how to fix this, or what to look at,.. is greatly appriciated!!
UPDATE:
I’ve been running my computer for over a day now and the Python 32 (PlexScriptHost.exe) has not been running my cpu at 17% anymore. It seems like it’s fixed. More time will tell. But for anyone else with this problem, here’s what I did…
Edit the file runtimekit.py in this folder:
… \Plex Media Server\Resources\Plug-ins-e3c1f7bcd\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\
At line 376 you find this function:
def _get_registry_subkeys(self, key, subkey):
try:
import _winreg
except ImportError:
return None, []
# MY FIX: RETURN IMMEDIATLY TO FIX CPU SPIKEING..
return handle, keys
handle = None
keys = []
try:
flags = _winreg.KEY_ENUMERATE_SUB_KEYS | _winreg.KEY_WOW64_32KEY
handle = _winreg.OpenKey(key, subkey, 0, flags)
i = 0
while True:
keys.append(_winreg.EnumKey(handle, i))
i += 1
except WindowsError:
pass
return handle, keys
I just added the comment and command:
# MY FIX: RETURN IMMEDIATLY TO FIX CPU SPIKEING… return handle, keys
If you decide to modify the _get_registry_subkeys method, you might consider changing your inserted line to:
return None, []
(because the variables “handle” and “keys” are not declared until later).
I was having the CPU problem too; my fix was to add a single “return” statement on line 355, as the first line of the _add_win_mimetypes method:
def _add_win_mimetypes(self):
return # MY FIX: return immediately to fix CPU spiking...
try:
import _winreg
except ImportError:
return
This fixed the problem for me too (since it prevents the bad _get_registry_subkeys method from ever being called).
I am not a python developer so I don’t know which fix is better. I hope the Plex Devs are watching these forums so they can fix the bug for everyone else.
I am having the same CPU issue, Plex is spawning 7 or so python process taking ~80% of CPU. I attempted to make the above recommendation to the _add_win_mimetypes method, but have been unable to find it. No such method exists in the runtimekey.py file. I even ran a text search on the who Program Files (x86)\Plex folder. I am running version 1.19.5.3112 on Windows 10.
Any suggestions would be appreciated. This issue is making my Plex Server almost unusable after approx. 2-3hrs of runtime.
I’m also having the same issue. I recently reformatted my laptop and decided to see how well it would work as a server. I haven’t added any media yet but the resource use and downloading is appalling. I’m on a limited data network so it matters.
My system is:
i7 4700HQ
16GB Ram
256GB SSD
GTX 860m 2GB
Plex v. 1.20.1.3252
Windows 10, fully updated.
What program are using to open the .py file?
This is my first time trying Plex. Is this a Windows only problem? I was thinking about switching to Ubuntu if the software works well for my needs.
You can open python (.py) files with any text editor. I like notepad++ on Windows. My system is running on Windows 10 so I have no information on if this problem exists on a Linux OS or not