PMS maxes out CPU until it crashes

Server Version#:1.26.1.5798
Windows Server 2019, i7, 32GB, P2200

Up until the past major update, my PMS has been running flawlessly for the past couple of years. Now, after starting up PLEX, it’ll maxing out the CPU even just browsing the PLEX Home Screen. When it’s around 98-99% it becomes unresponsive until it crashes.

I’m also getting these in the server console logs, but they don’t seem to happen until after PLEX has been maxed out and on the verge of crashing.

SQLITE3:0x30b80b0f, 6154, os_win.c:46582: (8) winMapfile2() - Not enough memory resources are available to process this command.

Hard to tell what is happening from a log snippet.

Do you have a full set of server logs that capture a crash?

If not, grab a new set after the problem reoccurs.

  1. Set server for debug logs. Settings → Server_Name → General.

  2. Restart Plex Media Server or reboot the server.

  3. Re-create the problem (or wait for it to occur).

  4. After it crashes, restart Plex and wait 2 - 3 minutes for it to fully start.

  5. Pull log files, Settings → Troubleshooting, and attach the zip file to the thread.

I couldn’t get it to crash again, but it was doing the High CPU thing again and stayed high so much where clients were starting to lose their connections to PMS. See if this can tell you anything.
Plex Media Server Logs_2022-05-12_22-02-55.zip (3.1 MB)

Thanks for the log files.

Other than the “not enough memory errors” nothing stands out as a problem.

I searched the forum, but did not see anything applicable.

I’ll see if I can track down some help in the morning.

Still looking for info on the SQLITE3 error.

Two additional items: Database Optimization and Scheduled Tasks

Please optimize your database. I’m not seeing any entries in the log files for this.

Please Empty Trash, Clean Bundles, then Optimize Database. See screenshot below. Clean Bundles & Optimize Database are also available via Settings → Troubleshooting.

Note that your system may become non-responsive during the optimization, and it may take several minutes to complete. You will see a spinning semi-circle around the activity icon while the optimization is occurring.

dance


Scheduled Tasks

Do you leave your system on during the window for maintenance tasks (Settings → Scheduled Tasks)? These tasks help with system stability. It is also when chapter thumbnails, intro markers, etc may be generated (Settings → Library).

These show up in the log files as Butler tasks, and I do not see any such entries in your log files.
Example:

May 13, 2022 04:01:30.662 [0x7f14b4c57b38] DEBUG - Butler: we're in the window, starting.
May 13, 2022 04:01:30.662 [0x7f14b4c57b38] DEBUG - Butler: Waking up!
....
May 12, 2022 17:21:00.654 [0x7f14b87e1b38] DEBUG - Butler: refreshing metadata for 6 movies because they haven't been refreshed in the past month
....
May 12, 2022 18:01:30.589 [0x7f14b4eb5b38] DEBUG - Butler: we're outside the window, stopping.

Suggest you leave your system running during the maintenance window. You might want to expand the window to allow more tasks to complete.

Schedule the window when the system is least used for streaming movies/shows.

Some of the tasks can cause CPU utilization to spike.

Also, if your media is on a NAS/network drive, generating video preview thumbnails can cause a lot of network traffic (I regularly see 600 Mbps+ traffic between my Plex server & NAS during the process).

Thanks I’ll take a look and see. But I was able to get it to crash just now.

Attached are the new logs.
Plex Media Server Logs_2022-05-13_19-31-34.zip (4.4 MB)

Thanks for the log files. The crash is visible at the end of Plex Media Server.1.log at 19:22.

There is definitely something going on with memory usage on your system. The Plex logs show several memory related error messages before the system crash at ~19:22. See log entries below.

Are there other applications or services running on the system that might use a lot of memory? You’ve 32GB RAM and Plex is a 32-bit process. It would not normally use anywhere close to that amount of memory.

Please configure your system to log memory usage. You’ll need to edit the Windows Registry and create an entry with LogMemoryUse = 1. Then re-start Plex Media Server. See Advanced, Hidden Server Settings for details.

There was a memory leak problem ~2 years ago which was traced to problems with Intel graphics drivers. You’re using Nvidia, so that should not be an issue. Still, you might check that the graphics drivers are up to date.

Two additional options to consider to help troubleshooting:

  • attach VMMap to the Plex Media Server.exe process and have it refresh automatically every few seconds and then see what the usage looks like when it crashes - See VMMap - Windows Sysinternals | Microsoft Docs
  • Watch memory usage on the system using Resource Monitor and see what it is when the Plex Media Server crashes

Thanks for your patience. I’ve traded messages with some Plex employees. Unfortunately, nothing stands out as the definitive cause of the crashes. Hence, the requests for additional investigation.



In Plex Media Server.1.log:
415 occurances:
May 13, 2022 18:47:25.607 [8132] ERROR - [TranscodeOutputStream] Unable to allocate RingBuffer for transcode

98 occurances:

May 13, 2022 18:59:41.011 [9816] ERROR - Format [JPEG] - Insufficient memory (case 4)
May 13, 2022 18:59:41.011 [9816] ERROR - Error resizing an image, we don't trust what we cached [C:\PlexData\Plex Media Server\Cache\PhotoTranscoder\e3\e3904688c681a6504fc3535f7cfb8a1774e41af6.jpg]

4 occurances:
May 13, 2022 18:59:44.815 [8132] ERROR - Format [JPEG] - DIB allocation failed, maybe caused by an invalid image size or by a lack of memory

Here’s another log with memory logging, it didn’t crash - but clients were unable to connect as it was hanging around 98-99% CPU usage. I noticed in VMMap that there were a ton of Private Heap memory usage, but I don’t know what that means.

Also, I noticed that the CPU issue only seems to happen when I use iOS PLEX clients. Other clients don’t seem to invoke the high and continued CPU usage.

Plex Media Server Logs_2022-05-14_21-39-04.zip (1.5 MB)

Just an update. Issue was still there with 1.26.2.5797; however, with today’s PLEX iOS update 8.3, it seems to have fixed the issue. My PMS server isn’t maxing out anymore when being browsed by an iOS device with the new PLEX app update. So all good in the hood now :slight_smile:

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