Plex keeps crashing/closing

4423c97d-dd59-4f8b-be8b-ec3bc0df3e6b.zip (206 Bytes)

There are no application errors / application exceptions at 09:06. The only Application error is at 05/05//2022 at 9:17:26

Log Name: Application
Source: Application Error
Date: 5/05/2022 9:17:26 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: Malflix
Description:
Faulting application name: Microsoft.Photos.exe, version: 2021.21120.8011.0, time stamp: 0x61b15fec
Faulting module name: twinapi.appcore.dll, version: 10.0.22000.593, time stamp: 0xa5a9468c
Exception code: 0xc000027b
Fault offset: 0x000000000010a594
Faulting process ID: 0xa788
Faulting application start time: 0x01d86016796cd555
Faulting application path: C:\Program Files\WindowsApps\Microsoft.Windows.Photos_2021.21120.8011.0_x64__8wekyb3d8bbwe\Microsoft.Photos.exe
Faulting module path: C:\WINDOWS\SYSTEM32\twinapi.appcore.dll
Report ID: 84f826e5-5a98-4836-8ee2-3dd38541f2fa
Faulting package full name: Microsoft.Windows.Photos_2021.21120.8011.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App
Event Xml:



1000
0
2
100
0
0x80000000000000

326215


Application
Malflix



Microsoft.Photos.exe
2021.21120.8011.0
61b15fec
twinapi.appcore.dll
10.0.22000.593
a5a9468c
c000027b
000000000010a594
a788
01d86016796cd555
C:\Program Files\WindowsApps\Microsoft.Windows.Photos_2021.21120.8011.0_x64__8wekyb3d8bbwe\Microsoft.Photos.exe
C:\WINDOWS\SYSTEM32\twinapi.appcore.dll
84f826e5-5a98-4836-8ee2-3dd38541f2fa
Microsoft.Windows.Photos_2021.21120.8011.0_x64__8wekyb3d8bbwe
App

I added a string Value and names id LogMemoryUse and gave it a value of 1. Is this correct.

The issue is when Plex crashes, it could be at any time of the day and I may not be at the computer at the time and only realize when I get back to the computer.

I’ll do my best…

Thank you for your time again…

Also now I have made the registry change, do I need to adjust any setting in the Plex settings?

No - but you may need to restart Plex Media Server

How is Plex Media Server being relaunched after the crash - after a crash it should just be down and not writing to the logs. It is when you discover it as down and relaunch Plex Media Server after a crash that you need to capture the logs. Do you have some automation that is detecting the crashes and auto re-launching ? If you do, please disable it

Thank you for the prompt reply. After Plex has crashed I just run the program again. Yes I do have a program which detects Plex has crashed and auto re-launches it. I have disabled the program. OK, so after I have noticed Plex has crashed, I will relauch and capture the logs for you.

Thank you

Ps. re enable logging of memory how do I send you this info?

Some of the log lines will have this added (Memory Usage: xxx.0 MB/xxxxx.0 MB)
You can just upload the server logs zip here as before

Plex Media Server Logs_2022-05-07_15-48-50.zip (7.5 MB)
Plex crashed a few minutes ago, see attached.

Thank you for your valuable time. :slight_smile:

Plex Media Server Logs_2022-05-08_10-59-44.zip (6.7 MB)
Plex crashed a few minutes ago, see attached.

Thank you for your valuable time. :slight_smile:

Plex Media Server Logs_2022-05-09_15-30-54.zip (6.9 MB)

Plex crashed a few minutes ago, see attached.

Thank you for your valuable time. :slight_smile:

Thank you for all the logs

There are not actual crashes but lockouts where the server stopped responding to requests. We would need to get deadlock diagnostics for these and that would be

  • list of connections
  • process dump
  • logs as you have been providing

To get the list of connections at the time of the lockout you need to find out in advance what the server security token is and note it down for use when the lockout arises

On windows you can get that from the registry within
HKEY_CURRENT_USER/Software/Plex, Inc./Plex Media Server
and looking up the value of PlexOnlineToken

When the next lockout occurs, load a browser directly on the server and type in this url - replacing the xxxxxxxxxxxxx with the security token for the server

http://127.0.0.1:32400/connections?X-Plex-Token=xxxxxxxxxxxxxxxx

Wait for the response and then copy it into a text file and save and note down the time

Then force a process dump for the Plex Media Server process
In windows task manager detail view, locate the Plex Media Server.exe process and right click on it and select “create dump file”

After the dump file is saved, locate it, and restart the server and get the server logs as you do normally

zip the dump file and upload to google drive or one drive or dropbox etc and send me by private message link to where the zip was uploaded - also include the saved connections text file and the server logs zip

Thank you

The logs i received do not show any memory usage logging

Please check the registry again for the user account that Plex Media Server.exe runs in and see if you have added
LogMemoryUse with value 1
Computer\HKEY_CURRENT_USER\SOFTWARE\Plex, Inc.\Plex Media Server

It is DWord 32-bit value named LogMemoryUse
and has a value of 1
and it is to be below
Computer\HKEY_CURRENT_USER\SOFTWARE\Plex, Inc.\Plex Media Server

My plex server on Windows keeps crashing as well. I’ve added my log files (zip) to this thread in the hopes to get some information. There are times where, even though Plex server is still running, my plex players will show it is not available. I have to actually reboot the computer to get the server seen again.

Server Version#: Version 1.25.8.5663

Plex Media Server Logs_2022-05-10_12-34-25Crashed.zip (4.8 MB)

I have enabled the above mentioned LogMemoryUse with a 1 (decimal) and restarted plex so any memory usage will appear in my next crashes.

Ignore any of the errors for Live TV, I have another thread (Plex will not show TV Guide and has stopped recording - #8 by dzeff) where I am having issues with the DVR and have unplugged my TV tuner for now.

Thanks for the logs

There are a couple of issues here

  • the database appears to have got corrupted
May 10, 2022 09:40:58.251 [8828] ERROR - SQLITE3:0x85ae95fb, 11, database corruption at line 67162 of [1b256d97b5]
May 10, 2022 09:40:58.251 [14640] ERROR - SQLITE3:0x85ae95fb, 11, database corruption at line 67162 of [1b256d97b5]
May 10, 2022 09:40:58.251 [8828] ERROR - SQLITE3:0x85ae95fb, 11, statement aborts at 5: [select id from metadata_items where guid=? and id<>? ] database disk image is malformed
May 10, 2022 09:40:58.251 [14640] ERROR - SQLITE3:0x85ae95fb, 11, statement aborts at 5: [select id from metadata_items where guid=? and id<>? ] database disk image is malformed
May 10, 2022 09:40:58.252 [14640] ERROR - Soci Exception handled: sqlite3_statement_backend::loadOne: database disk image is malformed
  • you appear to be running multiple instances of Plex Media Server.exe on the same machine. I suspect this is because you are running it as scheduled task or service and it is also starting as a process automatically on logging in on windows !
    Multiple instances lead to indeterminate outcomes and may also cause database corruptions

If you run Plex Media Server as a service or scheduled task you must ensure you disable the automatic start on login - which is the default after every install / update. You could also use the 3rd party service wrapper solution that many users use instead of inventing your own - see PMS as a service - General Discussions / Tips, Tricks & How-Tos - Plex Forum

For database corruptions - see
Repair a Corrupted Database | Plex Support

Restore a Database Backed Up via ‘Scheduled Tasks’ | Plex Support

Good eye @sa2000, it is nice to have an employee who has the answers so quickly. I did have just such a setup but did not realize that starting plex as a service when the computer started up would cause such an issue. A nice update for the Plex server, that I have used in the past is that IF plex media server.exe is running, do not start a 2nd instance.

I have made updates to my system and have again repaired my plex db.

Now, even though I forgot to update the thread, it’d be nice if we could get the issue of the NVidia Shield losing the TV device fixed: Recording failed. Please check your tuner or antenna - #36 by dzeff

That would resolve most of my issues.

Sorry to piggyback and post in here, but I tried starting my own thread, but received no response.

My Plex just crashed again. “Server settings unavailable.” Then Plex disappeared. Restarted windows and got the most recent logs here.

My database was corrupted and a staff member helped me correct it enough to install the latest Plex version and get it to work. Which did work, but now I got another crash.

Plex Media Server Logs_2022-05-11_12-17-26.zip (8.2 MB)

I am not an expert on the crashes @beauchristopher but when I looked through server logs, in this case ‘Plex Media Server 2.log’ I see a low disk space issue that might be contributing to your issues.

If Plex is not handling the low diskspace correctly, it could crash.

May 11, 2022 10:52:12.229 [25276] DEBUG - Transcode Session: Going to restart at offset 2080.039062 with segment number 260
May 11, 2022 10:52:12.229 [25276] DEBUG - Killing job.
May 11, 2022 10:52:12.229 [25276] DEBUG - Job was already killed, not killing again.
May 11, 2022 10:52:12.229 [25276] DEBUG - Stopping transcode session 9b08b8201f60d8e7-com-plexapp-android
May 11, 2022 10:52:12.229 [25276] DEBUG - Starting a transcode session 9b08b8201f60d8e7-com-plexapp-android at offset 2080.0 (state=3)
May 11, 2022 10:52:12.230 [25276] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
May 11, 2022 10:52:12.230 [25276] DEBUG - [Universal] Using local file path instead of URL: A:\Movies\Trick 'r Treat (2007)\Trick 'r Treat (2007).mp4
May 11, 2022 10:52:12.230 [25276] DEBUG - TPU: hardware transcoding: final decoder: , final encoder:
May 11, 2022 10:52:12.231 [25276] WARN - Low disk space: 75.59kB source file, 930.91GB capacity, 0B available on “C:\Users\BC\AppData\Local\Plex Media Server\Cache\Transcode\Sessions”
May 11, 2022 10:52:12.231 [25276] WARN - TranscodeSession: inadequate disk space for transcode
May 11, 2022 10:52:12.231 [25276] DEBUG - Streaming Resource: Terminating session 1535C340:9b08b8201f60d8e7-com-plexapp-android which is using 1974kbps of WAN bandwidth. Used is now 10006641kbps
May 11, 2022 10:52:12.231 [25276] DEBUG - Streaming Resource: Terminating session 1535C340:9b08b8201f60d8e7-com-plexapp-android which is using transcoder slot. Used slots is now 5
May 11, 2022 10:52:12.231 [25276] DEBUG - Streaming Resource: Terminated session 1535C340:9b08b8201f60d8e7-com-plexapp-android with reason Not enough disk space to convert this item.
May 11, 2022 10:52:12.231 [25276] ERROR - Failed to start session.
May 11, 2022 10:52:12.231 [12964] DEBUG - Killing job.
May 11, 2022 10:52:12.231 [12964] DEBUG - Job was already killed, not killing again.
May 11, 2022 10:52:12.231 [12964] DEBUG - Stopping transcode session 9b08b8201f60d8e7-com-plexapp-android
May 11, 2022 10:52:12.235 [14524] DEBUG - Completed: [127.0.0.1:50725] 200 GET /status/sessions (85 live) GZIP 12ms 13908 bytes (pipelined: 31)
May 11, 2022 10:52:12.240 [12964] ERROR - SafelyWriteFile: fwrite failed: 28 (No space left on device)
May 11, 2022 10:52:12.240 [12964] DEBUG - Whacked session 9b08b8201f60d8e7-com-plexapp-android, 5 remaining.
May 11, 2022 10:52:13.577 [14520] DEBUG - Auth: authenticated user 626070 as rygarfrost

Thanks so much! I appreciate any help. I will make more room now.

I fixed my hd space issue, but got yet another crash. Settings unavailable and network not working.

Plex Media Server Logs_2022-05-12_15-01-48.zip (8.0 MB)

I am close to reinstalling windows and plex if it will fix my issue.

Maybe @sa2000 can chime in but your logs might benefit from using ‘verbose’ logging mode? It is in your Settings under ‘General’ you then select ‘Enable Plex Media Server verbose logging’. But again, I defer to @sa2000 .

Looking in Plex Media Server.1.log I see a bunch of HTTP 503 which is a server unavailable errors. It also looks like, at 2:34 PM on the 12th, that your system ran out of memory when recording?

May 12, 2022 14:34:10.279 [24344] DEBUG - [Transcode] [FFMPEG] - Loaded sym: NvEncodeAPIGetMaxSupportedVersion
May 12, 2022 14:34:10.296 [24344] ERROR - [Transcode] [FFMPEG] - OpenEncodeSessionEx failed: out of memory (10): (no details)
May 12, 2022 14:34:10.296 [24344] WARN - [Transcode] Codecs: avcodec_open2 returned -12 for encoder ‘h264_nvenc’
May 12, 2022 14:34:10.319 [24344] DEBUG - [Transcode] Codecs: testing h264_mf (encoder)

I’m not sure on timing with your server restart at 3 but it is suspect to me. Were you recording something when you ran out of memory? If so I might suggest changing the transcoding options so that it is not doing it real time and instead, after recording is done?

I willl have a look at the fresh logs but the diskspace issue may have resulted in a bad database

May 11, 2022 10:03:40.498 [26196] ERROR - SQLITE3:0xc90bd8b3, 13, os_win.c:44993: (112) winWrite1() - There is not enough space on the disk.
May 11, 2022 10:03:40.498 [26196] ERROR - SQLITE3:0xc90bd8b3, 13, statement aborts at 101784: [select distinct media_items.id as 'media_items_id', media_items.library_section_id as 'media_items_library_section_id', media_items.section_location_id as 'media_items_section_loca
May 11, 2022 10:03:40.640 [26196] ERROR - Got exception from request handler: sqlite3_statement_backend::loadRS: database or disk is full

So it sounds like you (@sa2000 ) are saying that @beauchristopher should run the db repair task you linked in a message to me back on 11 May? Repair a Corrupted Database | Plex Support

It’d be nice for the Dev/QA team to work on the plex servers handling ‘out of memory’ and recovering. For example, if you run out of memory when recording fail the recording and delete the temp file queued up.

Priority #1 (or Pri 0) depending on how your dev team sets priority should be to support the core functionality:

  • Seamless (play/rewind/fastforward/save location if you back out) Video playback support of different file types in a seamless fashion. For example, I have media files where skipping back 10 seconds will actually skip forward 5 minutes. I forget the specifics but I know there is a forum topic about it.
  • DVR: There should be no hardware failures that Plex cannot recover from. If for example the hardware is not detected (another discussion topic I’ve commented on) then Plex should try something as simple as shut down and restart. I’ve had it happen often on my shield and a couple of times on a Windows machine (but far less often). That issue often happens when recording the late night shows and my TV tuner supports 2 streams but there might be 3 that try to record … and plex freaks out.
  • Add features that help shore up net promoter scores and get people (myself included) to stop whining:
    ** Why, when Plex is counting down to play the next episode is it not already queuing up that next episode so that when it starts playing, it is buffered and can just go.
    ** Why does the player on my NVidia Shield count down from 10 but my Chromecast counts down from 15 before the next episode plays?

I have really enjoyed my Plex Pass these last few years and LOVE the DVR feature, just missing the reliability of the DVR I had with my TV provider before we cancelled for an antenna.