Plex server crashing repeatedly, maybe linked to media scan?

Server Version#: 1.24.5.5173-600
Player Version#: Safari web browser, appleTV & iOS devices
Synology DS15020+ DSM 6.2.4-25556 Update 2

My Plex server has started crashing periodically, maybe every 3-4 days. Before this it has been rock solid for literally years. As an example, I tried to connect this morning and it was not running. I restarted it and downloaded the logs.

Looking at the most recently modified files, there were several timed to when I restarted it but I inspected the last ones when it was running previously which were modified before that at just after 2 am.

The Plex media scanner had started:
Nov 18, 2021 02:05:31.168 [0x7f0eff6adb38] INFO - Plex Media Scanner v1.24.5.5173-8dcc73a59 - Synology DS1520+ x86_64 - build: linux-x86_64 - GMT 00:00
and immediately started to get errors:
(Failed to connect to 127.0.0.1 port 32400: Connection refused)
The logs show it was trying to update media for my library of spoken word (audio books, radio plays etc, all with their own embedded meta data).
The last error before the log stopped was:
Nov 18, 2021 02:05:35.134 [0x7f0f025ce848] WARN - HTTP error requesting PUT http://127.0.0.1:32400/activities/e41effa3-7ff6-418a-9c60-2522a7a472f5?percentComplete=100 (7, Couldn’t connect to server) (Failed to connect to 127.0.0.1 port 32400: Connection refused)

A moment earlier com.plexapp.system.log.1 showed:
2021-11-18 02:05:33,129 (7ff438d17848) : INFO (pipeinterface:87) - Stopping plug-in

The Plex Tuners Service shows activity at the same time:
Nov 18, 2021 02:05:33.135 [0x7f48d6ef4848] INFO - [I] device_manager_t::term
Nov 18, 2021 02:05:33.135 [0x7f48d6ef4848] INFO - [I] device_manager_t::term. Stop all devices
Nov 18, 2021 02:05:33.135 [0x7f48d6ef4848] INFO - [I] device_manager_t::term. Shut down all device auxes
Nov 18, 2021 02:05:33.135 [0x7f48d6ef4848] INFO - [I] tvbutler_aux_t::term
Nov 18, 2021 02:05:33.248 [0x7f48d6ef4848] INFO - [I] web_server_t::stop. Web server is stopped
Nov 18, 2021 02:05:33.248 [0x7f48d6ef4848] INFO - [I] device_manager_t::term
Nov 18, 2021 02:05:33.248 [0x7f48d6ef4848] INFO - [I] device_manager_t::term. Stop all devices
Nov 18, 2021 02:05:33.248 [0x7f48d6ef4848] INFO - [I] device_manager_t::term. Shut down all device auxes
Nov 18, 2021 02:05:33.248 [0x7f48d6ef4848] INFO - [I] broker_t::shutdown. Shutdown is completed.

So a plugin was stopped, then the Plex media scanner goes into reams of errors and the servers stops and finally the Plex Tuner Service shows a shutdown of something. I am not sure if this is the cause but is the last activity shown.

Any ideas what is going on and how to fix it?

Thanks.

Plex Media Server Logs_2021-11-18_11-06-58.zip (3.3 MB)

I’m having the same issue

I had the same issue happen to me last month and I finally rebuild the server which seemed to have fixed the issue for about a week. Yesterday when I ran a scan it crashed the server. I added more content and can’t seem to finish scanning the server without it crashing.

Same here. I haven’t looked into the logs (wouldn’t know what I was looking at) but the system has stopped working 4 or 5 times in the last month and starting and stopping Plex on the server if I’m at home, or rebooting my NAS if I’m away from home, is the only way to get it working again.

May I see the logs

  1. Verify DEBUG logging is enabled
  2. Verify VERBOSE logging is disabled
  3. Download the logs ZIP file after capturing the failure
  4. Attach here.

I cannot see what’s happening when DEBUG is turned off. Turning DEBUG off does not save space. Logs are fixed size (50 MB) independent of the logging level.

I’ve been having the same issue.
Also every 3 days.

However I’m on DSM7 (been stable on DSM7 since the first alpha release :slight_smile:
Server Version: 1.25.0.5246

I tracked this down to the scheduled maintenance (the 3 days and time in mornings that it runs coincide exactly).
Seems my Plex just dies during this process for some reason. I also see on my Synology historic resource monitor that my Synology RAM usage spikes during those periods to almost 100%, and Synology then just terminates the process.

Also, if I run some of the manual Troubleshooting items like “Optimize Database” it seems to hang Plex (CPU maxed out on a core). I left this running for about 10 minutes before stopping and restarting the service. This is different from the out of memory crash during scheduled maintenance however, but possibly related?

I’ll try and get some more logs as well
 will have to run it until it crashes.

I have turned on debug logging and disabled verbose logging. I will wait until the next crash and then upload the logs.

Thanks.

I’ve also now added the LogMemoryUse=“1” attribute to the XML tag in the preferences file. It crashes only every three days, and the only indication I can see of anything scheduled every three days is DB backup and refreshing (local) metadata:

image

And I can see the backup file(s) were successfully created, so it may be the metadata refresh
 should I disable that and see? Can I trigger that manually?

On a side note, I see you requested:

LogMemoryUse=“1”

in one post, yet in another you asked for:

LogMemUse=“1”

I’ve added both for now


I’m getting crashes related to metadata refresh also.

If i add tv shows, no problem.

But add any random movie, the folder scans, it shows up on homepage, but then things stop working. Clicking the activity button shows 'refresh metadata:‘new movie’ the status wheel is at 50% and continues spinning. In a few minutes plex totally crashes and shows in DSM as stopped and needing to be restarted.

Once restarted the new movie is visible, all back to normal.

Since my problem happens reliably every 3 days, I tried by disabling one of the two scheduled tasks that mentioned “every 3 days”.

I disabled “Refresh local metadata every three days” and have thus far had no problems.

I’m going to leave this disabled for now until the bug is corrected.

My server crashed at 2am this morning and so here are the logs as requested.
Plex Media Server Logs_2021-12-09_17-48-01.zip (4.3 MB)

I hope they give a clue as to what is going on.
Thanks, Dave

I am also experiencing plex server crashes on Synology, attached are my logs. Thanks!
Plex Media Server Logs_2021-12-09_14-40-10.zip (3.6 MB)

Folks,

I’m trying to hone in on what these have in common therefore I have a question or two

  1. Do you have music?

  2. If music, How much ? (track count)

  3. Photos ?

  4. Rough count ? 1000, 5000, 10000, 25000, 50000 ?

  5. Movies ?

  6. Count ?

  7. TV series

  8. Episode count (in total) ?

If you examine your logs right after it crashes, in the “Plex Media Server.1.log” file,

Scrolling up from the bottom,

What’s it processing when the crash occurs ?

Thanks for getting back. The answers to your questions are as follows:

  • Do you have music? Yes
  • If music, How much ? 1,560 Albums, 22,413 tracks
    I also have an audio book library with 4,613 tracks
  • Photos ? No, I don’t use Plex for photos
  • Rough count ? 0
  • Movies ? Yes
  • Count ? 2,158
  • TV series. Yes
  • Episode count (in total) ? 16,876

Looking at the Plex Media Scanner log, Plex seems to be looking at my spoken word library just before the crash:
Dec 09, 2021 01:42:36.755 [0x7fb06a80b848] DEBUG - Scanner: Processing directory /volume1/music/Spoken Word/Compressed/Science Fiction/Colin Sharpe - Dalek, I Love You Too (parent: yes).

Hope this helps.

may I have the logs please which capture this?

Also, if it’s reproducible, I’d like to arrange getting a DMP file from you too.

Can you assist ?

  1. Do you have music? Yes
  2. 14,438 tracks
  3. Photos ? No
  4. 0
  5. Movies ? Yes
  6. 416
  7. TV series? Yes
  8. 4,170 episodes

What’s it processing when the crash occurs ?

I can’t seem to see anything in particular in the log that it was scanning.

I do see this repeated a few times before it seemed to crash.

Dec 08, 2021 03:15:54.096 [0x7fb58c106b38] DEBUG - NetworkServiceBrowser: Parsing SSDP schema for http://192.168.86.52:9080
Dec 08, 2021 03:16:05.609 [0x7fb58e796b38] WARN - JobManager: Could not find job for handle 31146
Dec 08, 2021 03:16:05.609 [0x7fb58e796b38] WARN - JobManager: Could not find job for handle 31661
Dec 08, 2021 03:16:07.257 [0x7fb58c106b38] DEBUG - HTTP requesting GET http://192.168.86.52:9080
Dec 08, 2021 03:16:07.791 [0x7fb58c106b38] DEBUG - HTTP/1.1 (0.2s) 200 response from GET http://192.168.86.52:9080 (reused)
Dec 08, 2021 03:16:07.929 [0x7fb58c106b38] ERROR - XML: Entity: line 1:
Dec 08, 2021 03:16:07.929 [0x7fb58c106b38] ERROR - XML: parser
Dec 08, 2021 03:16:07.929 [0x7fb58c106b38] ERROR - XML: error :
Dec 08, 2021 03:16:07.929 [0x7fb58c106b38] ERROR - XML: Start tag expected, ‘<’ not found
Dec 08, 2021 03:16:07.929 [0x7fb58c106b38] ERROR - XML: status=ok
Dec 08, 2021 03:16:07.929 [0x7fb58c106b38] ERROR - XML: ^
Dec 08, 2021 03:16:07.929 [0x7fb58c106b38] ERROR - Error parsing content.
Dec 08, 2021 03:16:08.330 [0x7fb58c106b38] ERROR - Error parsing XML: Error parsing file.
Dec 08, 2021 03:16:08.418 [0x7fb58c106b38] ERROR - SSDP: Error parsing device schema for http://192.168.86.52:9080

  • Do you have music? Yes
  • If music, How much ? 1,255 Albums, 11,888 tracks
  • Photos ? No, I don’t use Plex for photos
  • Rough count ? 0
  • Movies ? Yes
  • Count ? 995
  • TV series. Yes
  • Episode count (in total) ? 2,900

Also I have Tidal music disabled (and any external media sources).

Hi, I uploaded the Plex Media Server Logs previously, are you looking for something extra?

My crashes are not occurring every three days like ailoken01 and I do have various scheduled tasks set, including backup of data bases every 3 days and refresh of meta data.

One other piece of information I do have an HDHomeRun tuner connected for live TV but I don’t record from it.

The last entry in the Plex Media Server.1.log are:

Dec 09, 2021 02:05:01.201 [0x7ffab34a3b38] DEBUG - EPG[cloud]: Next thing to start/end is at 2021-12-09 02:06:00 GMT (in 60 seconds)
Dec 09, 2021 02:05:08.069 [0x7ffab8f4db38] DEBUG - Completed: [192.168.1.232:52584] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (13 live) TLS GZIP 20001ms 5 bytes (pipelined: 404)
Dec 09, 2021 02:05:08.071 [0x7ffab438ab38] DEBUG - Request [192.168.1.232:52584 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (13 live) TLS GZIP Signed-in Token (whitedb)
Dec 09, 2021 02:05:08.071 [0x7ffab438ab38] DEBUG - Content-Length is -1 (of total: -1).

@whitedb

Thanks for that fragment but it doesn’t tell me what it was doing.
It’s

  • one entry about EPG
  • one entry about plex.tv/client communication
  • one entry asking for client capabilities.
  • one entry about the connected player authenticating

In your logs (Thank you), I do see the music activity. That’s why I ask how much you had.

Would you be willing to do the following?

  1. Settings - Server - General - Show Advanced
  2. Turn off “Upload Crash Reports to Plex”
  3. SAVE the change.

When it next crashes ,

Using FileStation, you’ll find,

Plex/Library/Application Support/Plex Media Server/Crash Reports/1.24.5.5173-8dcc73a59/PLEX MEDIA SERVER/_some name_.DMP

Could you make a zip of that DMP file ?

Next restart Plex and, as soon as the CPU is stable again, Download the Logs ZIP

Attach both the PMS logs and the DMP ZIP file ?

After doing so, you can again turn “Report Crashes to Plex” back on so you don’t accumulate a ton of DMP files.