Constant not-so-random crashes of PMS

Server Version#: 4.69.1
Player Version#: N/A

At least once daily, sometimes twice, I will notice Plex has simply stopped running. The Plex Crash Uploader seems to always have an entry at the exact same time as when the Plex as a Service tray icon’s logs tells me PMS has stopped. What is interesting is the PMS seems to be stopping/crashing possibly along side of some scheduled process as it seems to always happen right at the top of an hour (2:00am is common, along with 8:00pm).
Plex Crash Uploader.1.log (559 Bytes)
Plex Crash Uploader.2.log (560 Bytes)
Plex Crash Uploader.4.log (563 Bytes)
Plex Crash Uploader.log (562 Bytes)
Plex Media Server.1.log (2.1 MB)

Any help here?

I would try the following.

OK, just did this, will report back tomorrow if anything goes wrong, or to come back and mark as the solution. Thanks

1 Like

Spotted this error in your logs …

Feb 12, 2022 20:34:35.643 [15928] ERROR - Error parsing allowedNetworks '192.168.2.47;192.168.2.42': An invalid argument was supplied

While this may or may not be related to your crashes there is lots of network related errors so its worth a try as its most likely causing some level of problems.

I believe this should be a comma separated list of IP addresses so change 192.168.2.47;192.168.2.42 to 192.168.2.47,192.168.2.42 in your servers networks settings for plex.

Good catch, the other IPs leading up to those two are comma separated so I’ve updated and saved. Thanks

1 Like

Well, I cannot confirm or deny this has worked yet, last night I had to kill the power to my office, and when the battery backup finally knocked out, there was a series of weird server restarts needed, so my logs are a bit ■■■■ right now, but it has not shut down on me all day yet, so I will report back again tomorrow to mark as resolved for now, but I feel the DB rebuild was likely what was needed.

Welp, it shut down again on me, this time at 10:07pm EST on 2/17. I’ve attached the main PMS log here, let me know if other logs should be updated, this is so frustrating.
Plex Media Server.1.log (926.1 KB)

Just some things that jump out now in your logs…

Database Recovery:

Feb 16, 2022 19:04:57.603 [6384] INFO - SQLITE3:0x7a53737, 283, recovered 234 frames from WAL file E:\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db-wal
Feb 16, 2022 19:04:58.402 [6384] INFO - SQLITE3:0x7a53737, 283, recovered 811 frames from WAL file E:\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.blobs.db-wal

Network Problems … ?

Feb 16, 2022 19:04:59.186 [7484] WARN - [HttpClient] HTTP error requesting GET https://plex.tv/media/providers?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx (6, Couldn't resolve host name) (Could not resolve host: plex.tv)
Feb 16, 2022 19:04:59.193 [7524] ERROR - [MediaProviderManager] Error parsing content.

Unable to locate media - \telijahnasbox – shouldn’t you be using mapped drives ? (I don’t use windows but I’d imagine you should):

Feb 16, 2022 21:19:11.011 [14816] ERROR - Error opening file '"\\telijahnasbox\PlexMedia01\Movies\The Matrix Resurrections (2021)\The.Matrix.Resurrections.2021.1080p.WEB.H264-NAISU.mkv"' - No such file or directory (2)
Feb 16, 2022 21:19:11.419 [14816] WARN - Could not convert "state" ("error") to the correct type

Lots of this schema stuff – no idea what E:\jenkins\server is doing but maybe its normal:

Feb 17, 2022 02:45:33.499 [12716] INFO - SQLITE3:0x7a53737, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
Feb 17, 2022 02:45:40.507 [12716] WARN - Took too long (0.125000 seconds) to start a transaction on E:\jenkins\server\3584430353\Library\MetadataItem.cpp:7302

Memory Errors:

Feb 17, 2022 22:07:30.011 [3348] ERROR - Error resizing an image, we don't trust what we cached [E:\Plex Media Server\Cache\PhotoTranscoder\33\33da3645efb7f0513be11df9432bdb1a8a3a288e.jpg]
Feb 17, 2022 22:07:30.093 [3348] ERROR - Exception handled: bad allocation
Feb 17, 2022 22:07:30.118 [3348] ERROR - Exception handled: bad allocation
Feb 17, 2022 22:07:30.143 [3348] ERROR - Exception handled: bad allocation
Feb 17, 2022 22:07:30.466 [3348] ERROR - Format [JPEG] - Insufficient memory (case 4)
Feb 17, 2022 22:07:30.466 [3348] ERROR - Error resizing an image, we don't trust what we cached [E:\Plex Media Server\Cache\PhotoTranscoder\18\18cda3b0f609807fa13fdd1ce1925ef4f5e22442.jpg]
Feb 17, 2022 22:07:30.959 [0244] ERROR - Thread: Couldn't add a new thread to the pool of size 0: boost::thread_resource_error: Resource temporarily unavailable

There is so much happening its hard to see the wood from the trees, sorry :frowning:

Is this is a new installation or something that always worked and now is failing ? Maybe @tom80H might have some other insights. but also a full set of server logs might give some other hints.

Those findings of @anon5074910 are certainly fishy and indicate that something’s weird with your setup.
If you could produce a new set of server logs – please enable debug logging (but keep verbose logging disabled) → see Settings > [Server Name] > General

If you could produce a new set of server logs – please enable debug logging (but keep verbose logging disabled) → see Settings > [Server Name] > General

@tom80H : So I should enable all that and then provide new logs when it crashes again?

I’ll try to unpack some of this here, however, the entries from the evening of 2/16 should not be used since, as I explained in a previous reply, I had to kill power to my office. The server running PMS and the server running my NAS equipment are on a UPS, however the network equipment in the office where those two are at are not on the UPS, so those two boxes were essentially cut from the Internet and also could not communicate with each other for a couple hours.

I will do as suggested by tom80H and enable debug logging and provide a fresh set of the full logs.

One REALLY concerning thing is the comment about the schema issues. I have absolutely no clue what E:\jenkins is. The E: drive in my setup is where PMS does it’s transcoding and metadata storage. I am wondering if I have access to someone else’s PMS still and that is hidden in the settings somewhere.

I’ve been running PMS for ages, and these random shutdowns are a new thing, started happening about 2-3 months ago.

At any rate, debug logging enabled (verbose left disabled) and I will post up a full set of the server logs when it crashes again.

Hi @tom80H , attached are a new set of full logs. Log shows Plex again shutdown this morning at exactly 2:00:02 am this morning (2/19).
Plex Media Server Logs_2022-02-19_08-25-06.zip (4.5 MB)

Okay so I took a little look while we wait on Tom :slight_smile:

There is loads of this stuff, over 2000 of them in the hour up to the crash …

Feb 19, 2022 01:40:12.670 [14472] ERROR - [TranscodeOutputStream] Unable to allocate RingBuffer for transcode

… and the only topic I can see on this forum that has any reference to this error is from Plex Media Server has stopped working - #5 by sa2000 which is a very old topic which talks about memory allocation.

Also in your logs I see this …

Feb 19, 2022 01:39:29.870 [15608] DEBUG - Photo cache obtained 1024530 bytes from http://127.0.0.1:32400/library/metadata/128702/thumb/1645237358
Feb 19, 2022 01:39:29.870 [15608] DEBUG - Saving original media file to E:\Plex Media Server\Cache\PhotoTranscoder\2f\2f866e4fd00fea706e842e1abeb5fd9410fffe49.jpg
Feb 19, 2022 01:39:29.872 [15608] ERROR - Format [JPEG] - Insufficient memory (case 4)
Feb 19, 2022 01:39:29.872 [15608] ERROR - Error resizing an image, we don't trust what we cached [E:\Plex Media Server\Cache\PhotoTranscoder\2f\2f866e4fd00fea706e842e1abeb5fd9410fffe49.jpg]

… which again seems to indicate some memory problem. What time do you have the plex Scheduled Tasks to run at ? If its 2am then my guess is that up until that point your system is under stress but staying alive and then when maintenance kicks in it blows the server up and crashes.

I also see a dmp was created at Feb 19, 2022 02:00:03.093 [6228] ERROR - Trashing E:\Plex Media Server\Crash Reports\1.25.6.5545-c8bd13540\PLEX MEDIA SERVER\4b581f67-ec2f-4a20-b02a-cbb6fe528a55.dmp so maybe Tom or someone from plex could take a look at that.

One thing I’m somewhat interested in is the PhotoTranscoder and those errors. What size is your E:\Plex Media Server\Cache\PhotoTranscode folder ? This cache can grow unbounded to crazy levels (see Cache/PhotoTranscoder Folder Size Sanity Check for some context). What might be worth a try if nothing else is to nuke this cache completely (delete everything under PhotoTranscode) and see if the server crashes again tonight. Make sure plex is not running when you delete it. Plex starts creating a new cache so its very safe to delete it (I delete mine weekly).

Over to @tom80H for additional comments and recommendations.

Not sure if physical memory is a problem, according to WizTree, that folder is 10.2GB large right now, and 1.6TB of free space on the entire drive. E:\Plex Media Server\ itself is 108GB large.

Scheduled tasks are in fact set to run at 2am, and while I do see a lot of the Plex crashes happening at 2am, there also seems to be other times at the full hours it crashes too, such as 8pm frequently.

“storage” (e.g. your hard drives, network shares… → mass storage) isn’t the same as “memory” (volatile → keeps data for immediate processing).

If the computer doesn’t have sufficient memory it cannot proceed with its regular operation. This can happen if your system has not enough memory to start with or there’s many parallel activities processing a lot of data at the same time.

The scheduled tasks will process lots of data – so they’ll be rather memory-hungry. This could explain why the scheduled server maintenance brings your system to its knees (though why it’s not limited to that slot).

That being said… it appears your server keeps going for another 15-20 minutes after running into that trouble. Though it’s definitely linked to your server starting the regular maintenance.

How much memory/RAM has your Windows system?

Intel Core i7 3.5ghz with 16gb ram

In case you’re still up at 2am you could check the resource monitor from the Windows Task Manager to check this out. You can sort the apps/processes by memory consumption and see if Plex is the culprit (actually allocating all the memory) or if there’s multiple apps piling up their biggest demand at the same time.

Since my last reported crash at 2:00am on 2/19, it crashed again at 2/19/2022 7:54:36 PM, and again at 2/20/2022 10:41:11 AM. Attached are fresh logs
Plex Media Server Logs_2022-02-21_09-35-16.zip (5.2 MB)

If it is felt PC/server resources are again to blame, anyone have a suggested tool that can monitor resource metrics and record them so I can maybe reconcile what else on this server has suddenly started wiping me out?

I am sure I am jinxing myself here, but the newest plex update has not had any crashes for me. It’s now been close to a week.