Plex Media Server stop working randomly with the last updates

server-synology

#1

Hi all! and thanks in advance.

With latest updates of the Plex Media Server, it becomes unstable everyday. Some data versions:
- Synology DS3615xs with DSM DSM 6.1.4-15217 Update 3.
- Plex Media Server Versión 1.13.0.5023
- Plexpy V2.1.4 on Docker

The server works well for hours, ( I have between 1 - 8 simultaneos streamings), but randomly the server become inaccessible. But in Package Center appears "running", but doesn't load in dashboard.
The only way to restart the service is:
- Stop Plex Media server in Package Center
- execute through ssh "sudo kill -9 $(ps aux | grep Plex | awk '{print $2}')"
- Start Plex Media server in Package Center.

This only work for several hours o with some luck a whole day. Some weeks before happens once a week.

I try to optimize databases, uninstall all Plug-ins (except Service.bundle), check errors with sqlite3, even make a dump.sql and restore. But nothing of this fix that.
I attach logs without debug ON.
In logs appears a WARM about PMP (NAT: PMP, got an error: Not Supported by gateway) but I have manually set the default port on server.

The server was still working over 2 years everyday 24/7 without problems.

Many thanks.


#2

From your logs:

May 13, 2018 10:15:38.303 [0xe3bffb40] INFO - Network Service: Abandoning browse socket, it was closed.
May 13, 2018 10:15:55.800 [0xe2623b40] ERROR - [Transcoder] [mp4 @ 0x9204340] Application provided duration: -1 / timestamp: 155496 is out of range for mov/mp4 format
May 13, 2018 10:30:56.879 [0xf3f24780] WARN - [FFMPEG] - Could not find codec parameters for stream 7 (Attachment: none): unknown codec
May 13, 2018 10:34:03.884 [0xed335b40] WARN - Held transaction for too long (../Library/MetadataItem.cpp:7176): 0.140000 seconds
May 13, 2018 15:25:09.069 [0xef223b40] ERROR - Unable to find client profile for device; platform=webOS, platformVersion=3.7.0, device=, model=49UJ635V-ZF
May 13, 2018 17:37:13.056 [0xe0fffb40] ERROR - Throttle: timed out trying to read chunk 1
May 12, 2018 18:31:50.244 [0xed111b40] ERROR - [Notify] Failed to add watch for /volume4/Plex_vol_4/Series/Altered Carbon/Series (13: Permission denied)
May 13, 2018 19:19:39.302 [0xd1511b40] WARN - Got a transcode session ping without a session GUID (or with an invalid one).

Wow, you certainly have a mixed bag with missing profiles, damaged media, slow database, an app not communicating properly and file permissions issues.

The first thing to do would be to reboot the modem/router and anything connected to it, including any wireless devices.

Then give your NAS and the TV static IP addresses or if your router supports it, use DHCP Reservation.

Then, I would check your media for errors. See Q17 and Q28 on the Synology FAQ's page, link in my signature.

After correcting your media, see Q18 on the Synology FAQ's page and RESET your file permissions, link in my signature. Also make sure the Plex shared folder has R/W permissions for both admin and Plex in DSM Control Panel > Shared Folders.

After taking care of your damaged media, you should re-install Plex. Then follow one of the two proceedures here:

Repair Database: https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database
Restore Database: https://support.plex.tv/hc/en-us/articles/202485658-Restore-a-Database-Backed-Up-via-Scheduled-Tasks-

Or simply delete Plex completely and start over. See Q7 on the Synology FAQ's page for more details, link in my signature.

It may also be advisable to reinstall the Plex app on your TV.

You should also update DSM to 6.1.6-15266 update 1


#3

Thanks so much trumpy81 for your fast response, I try and come back with results.

Thanks!


#4

Well, after check all the steps that trumpy81 gave me, I have to reinstall server from scratch. The summary that I tried:
- Reboot router (IP is static in synology), was ok for 22 hour, then crash.
- FAQ Q17/Q28: check video files and all OK. But server crash.
- FAQ Q18: reset permissions of media files, server crash.
- Repair Database - Restore Database: with no problems, but server still crash.

Now is time to reinstall. Thanks trumpy81 for your time.
I'll come back to tell if finally fix it or not.


#5

New advance in diagnostics.

After install Plex Media Server again into Synology in a new SSD, it was working for 3 days, and now come back to get unstable. I attach the server logs if someone can help me. I add too the summary of "ps ax | grep Plex" command, because I found some rare ports assigns like:

Plex Media Server Relay -p 443 -N -R 0:localhost:32401 (my server is config in port 32400)

Thanks in advance.


#6

I would suggest you update XPEnology to 6.x and then update DSM to DSM 6.1.6-15266 Update 1

The latest version of Plex has not been tested with and is not intended for DSM 5.x.

The minimum requirement for the 64bit version of Plex is DSM 6.0 as shown on the download page.

For some reason you have the 32bit version of Plex installed.

You also need to clean up your file names if you want Plex to work as intended. I recommend using FileBot to automatically rename your files for use with Plex.

FileBot for Synology:
https://www.filebot.net/forums/viewtopic.php?f=3&t=1802

Plex naming schemes for FileBot:
https://forums.plex.tv/discussion/191687/plex-naming-schemes-for-filebot/p1
http://www.filebot.net/naming.html

FileBot Introductory Videos:
http://www.filebot.net/getting-started/

Open Package Center > Settings > Package Sources and add this address: https://get.filebot.net/syno/
You will then be able to install FileBot on your NAS from Package Center > Community.

FileBot may also be installed on a PC/Mac/Linux machine.

Also, DO NOT let other apps save directly into your Plex Media folders. That can and does cause issues with Plex and is the most likely cause of your crashes.

Plex is unable to find a lot of your files:

May 20, 2018 12:02:22.332 [0xdbf35b40] ERROR - Error opening file '/volume1/P2P/Cine/Smrt.u.Sarajevu.(2016)(Spanish.Bosnian.Spanishsub).BDrip..m720p.x264-AC3.mkv' - No such file or directory (2)

See Q4 -> Q6 and Q18 on the Synology FAQ's page, link in my signature.

May 20, 2018 10:19:28.326 [0xef223b40] WARN - HTTP error requesting GET http://plex.tv/pms/:/ip (0, No error) (Couldn't resolve host 'plex.tv')

You need to reboot the modem/router and everything connected to it. I would also recommend that you check your network settings.

May 19, 2018 16:54:37.214 [0xdf335b40] ERROR - Unable to find client profile for device; platform=webOS, platformVersion=3.7.0, device=, model=49UJ630V-ZA

You may also need to create a device profile for your various TV's. See the Device Profile link in my signature.


#7

Thanks trumpy81,

Well I check a lot of points that you give me. And I'm very thankful.

On undetermined date from october '17 the file .spk of Plex Media Server that was donwload from the link Media Server itself, was a x86 version not a x64 that was installed before that date. I take some actions trying to fix the servere:

  • First of all I change the version to a x64 for Xpenology DS3615xs.
  • Second I delete a lot of stuff from libraries to reduce the databases and the items managed by the server.
  • Last action, I change the router for another model.

After these 3 actions, the Plex Media Server appears to be running without problems more than one week. I hope the problem was fix.

Thank you so much!


#8

never mind.


#9

Sorry for that Froberg.

In my case after more than 10 days working Plex without problems it crashed again. I found some rare things with the service inside Synology:

  1. The clients that are streaming aren't affected, they can play stream til finish. They can connect to server after the play.
  2. Some related Plex processes are running like that: /volume2/@appstore/Plex Media Server/Plex Relay -p 443 -N -R 0:localhost:32401 ............. -F /dev/null 139.162.247.112 But my server is running on 32400 and the last IP doesn't match with any of my clients.
  3. The only way to restart Plex without restart Synology is: 1. stop service in Package Center 2.Kill processes Plex related through SSH. 3 Start service in Package Center.

For the last step I create a bash script that can be executed from Task Scheduler:

#!/bin/ash
/usr/syno/bin/synopkg stop Plex Media Server
kill -9 $(ps aux | grep Plex | awk '{print $2}')
/usr/syno/bin/synopkg start Plex Media Server

I hope this can help you in some way.


#10

@bluesnow01 said:
Sorry for that Froberg.

In my case after more than 10 days working Plex without problems it crashed again. I found some rare things with the service inside Synology:

  1. The clients that are streaming aren't affected, they can play stream til finish. They can connect to server after the play.
  2. Some related Plex processes are running like that: /volume2/@appstore/Plex Media Server/Plex Relay -p 443 -N -R 0:localhost:32401 ............. -F /dev/null 139.162.247.112 But my server is running on 32400 and the last IP doesn't match with any of my clients.
  3. The only way to restart Plex without restart Synology is: 1. stop service in Package Center 2.Kill processes Plex related through SSH. 3 Start service in Package Center.

For the last step I create a bash script that can be executed from Task Scheduler:

#!/bin/ash
/usr/syno/bin/synopkg stop Plex Media Server
kill -9 $(ps aux | grep Plex | awk '{print $2}')
/usr/syno/bin/synopkg start Plex Media Server

I hope this can help you in some way.

Is the storage local to the DSM XPEnology? Are you running it in an ESX server?
Do you have other things installed that are downloading into Plex directories etc? Sickrage, couchpotato?
If the storage is remote to the server and you are mounting it run a ping and see if it has issues. I had swapping that was chewing up disk resources and causing ping issues and responsiveness issues. Other things downloading into the plex directories or chewing up all of your disk IO capacity can cause some interesting things too.
Look at utilization for disks and processes inside DSM and see if it shows you anything interesting.


#11

Hi @cul8rmom1, thanks for your advice.
At this time the server seems to work stable, with no errors for now. But answering your questions...

Is the storage local to the DSM XPEnology? Are you running it in an ESX server?
The storage is in local Xpenology wich is a baremetal.
Do you have other things installed that are downloading into Plex directories etc? Sickrage, couchpotato?
I do not download directly in the library folders, I use temp folder and after downloads script moves files to the specific library.
Look at utilization for disks and processes inside DSM and see if it shows you anything interesting.
There is no anomalous processes or high cpu/disk utilization. The only related thing about is what I related before about the Plex process running: "....Plex Relay -p 443 -N -R 0:localhost:32401 ..... " that never seen before except when Server hangs.

But fortunately seems to all back to normal, and all runs well after install version x86_64 of Plex Server and make some purge of media content of libraries.

Thans for your attention.