Plex server process keeps stopping

The technique does not change. The extension does. that’s about it.

Again, I suggest you be careful. Make a copy of your media into a test area. Test the script and what it does there.

Will post back with update when I have more. Thanks again.

FWIW: When I get some time over the next few days, I’ll write a script to do this. Trumpy and I were discussing a basic “Check everything” script. It will take a lot of CPU but it will perform basic checking of every video file to see if it can be read properly. If not, it will print out notification and the pathname.

Cool. The little command script works but is intimidating as a first go to those like me. I usually don’t mind giving ‘er a go as needed though.

I learned that I need to keep the window open that has the unc path to the media or the thing stops. I thought it was a really corrupt file but I typed in the \\path again in Explorer, hit enter and swoosh it continued again (after 2 days of being stopped). (Could be coincidence)

FYI plex Synology Package stopped again today but I wasn’t watching files all I wanted to do is look at my recording schedule on the iOS Plex app. Always from afar though via slow connection. Related? Not sure.

I will clean my files anyway (I like clean) but as the same ones were present before the plex package stopping issue began (No new added) I wonder if it was the root cause in this case.

I will continue the cleansing which might help speed and stability overall and also hope that the posted note about a possible related fix earlier in this thread will help with the unknown plex server shutdown as well.

The scan is great. It found way more issues than I would have expected. Here I thought I was so careful trying to get clean files from original source. I wish I could find a pattern. 1 season is fine and the next some errors.

I think everyone should run it.

@dpryke said:
Ok, so after posting this issue Plex did not fail for days, then failed once while I was unable to collect logs remotely, and has just failed now, so much less often than previously. Here we go I attach the log file. I realize it is effectively beta, that’s part of running beta to identify issues to resolve before GA, so I am happy at this point to stay on beta, in case you need more logs. Thank you for you assistance.

@ChuckPA said:
##To all reading here. Especially @dpryke and @bolderplex

I’ve been working with the team and have feedback.

There is a fix coming. Until it is released to public, limit what you have done in Scheduled Tasks.

Until i have the definitive list.

a) Turn off deep analysis and other automated analysis
b) Turn off database optimizations. (Perform this manually after adding media)

Version 1.11.1 of Plex Media Server has now been released as beta. It should include a fix for the crashes that arise when the database is inaccessible for a period of time.

See Release Notice
http://forums.plex.tv/discussion/comment/1602026/#Comment_1602026

  • A crash could occur on Windows after a library scan (#8029)

@trumpy81 said:
On the NAS yes, but i would copy the database file to your Mac/PC and work on it there, then copy it back after renaming the original. Make sure Plex is NOT running when you do that though.

The database is found here: Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases on the NAS.

I have the same issue. I am tech competent, but have not used Linux before. I SSH to the NAS and the Plex directory is not visible. I assume I don’t have permissions or I am looking in the wrong spot. Is there another way to get to the database that I should be using?

[UPDATE] Nevermind! It was a permissions issue. Even my Admin account did not have permissions to the Plex directory. As soon as I added R/W to the account, I was able to get to the DB. From here I was able to use File Station to get to the DBs.

Thanks!

I think I need to move my ‘media cleaning’ to another forum. (I don’t want to get off topic here). I looked but nothing popped out and am not sure what to search for. Suggestions?

Reason - I am running the original DVD (yes I still have them :slight_smile: ) through handbrake (current version) again but the same errors are reported from the scan of the file. I also tried running some of the old original media files I made years ago that were noted to have errors back through handbrake again but the errors don’t go away.

  • Do I have to change the container or encoding type to force it to grind through the old files and do something with them perhaps? (all files are m4v h264 and audio not sure)
  • Or is perhaps handbrake not the way to go and I should try and tackle this with another means like the script above (that scares me but I am game)

Same issue on my Synology NAS. Random stops and in general other strange issues like video pauses and such.

I downgraded to the last public version and it solved my issue.

@“Brandon.F” said:
Same issue on my Synology NAS. Random stops and in general other strange issues like video pauses and such.

I downgraded to the last public version and it solved my issue.

can’t find any uploaded crash reports for your server.

So the files that ffmpeg found errors I have started fixing them. Should i delete the existing file and let Plex ‘Update’ its database before putting them in again or should I just overwrite the old one with the new fixed one? I keep backups of the original of course.

Hi i am running 1.11.1.4753 on a d916+ and encounter a similar issue. My PMS stops working and i’ve to restart it.

@trumpy81 said:
Try installing the latest Plex Pass version. Report back if the issue continues, otherwise check your files and your logs.

Hi there,
I installed yesterday evening the PMS 1.11.1.4760 and as i came back from work today the server was crashed again. As requested I will add my logs to this post.

Thx for your help and i will install the recently released version today, too.

@trumpy81 said:
@K1ngLear Thanks for the logs :slight_smile:

What version of DSM are you running on your NAS?

Hi I run the DSM 6.1.5 - 15254 on a DS916+ with 8GB RAM. All virtual machines beside my Docker Containers are actually deactivated.

Hello team… PMS is crashing almost every night, same as the issues from Jan '18 others experienced. Captured the logs immediately after reboot. Running Version 1.18.2.2058 on DSM 6.2.2-24922 Update 4 on a DS218+ with 8 GB RAM. The crashing only began after adding the DVR service, and only in the 2nd week of running the service.
Plex Media Server Logs_2019-12-02_07-27-54.zip (3.8 MB)

1 Like

I think I have some similar problems. My Synology DS218+ with 2GB RAM is searching for Media for a very long time, after some time I can’t connect to PMS and also not to my DSM. I have to Restart it and also the Restart takes quite a lot of time to succeed. After that, the problem starts again. Maybe some bugs in the latest PMS Version. Plex Media Server Logs_2019-12-02_11-55-33.zip (7.1 MB)

Thank you for the logs. I found the problem.

Because you have more than 8192 total directories being monitored, the Linux table as filled up.

When this happens, PMS has trouble transcoding because it needs two notification slots.

Dec 02, 2019 11:12:30.710 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Sportfreunde Stiller/Burli" (28: No space left on device)
Dec 02, 2019 11:12:30.745 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Sportfreunde Stiller/So wie einst Real Madrid" (28: No space left on device)
Dec 02, 2019 11:12:30.753 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Sportfreunde Stiller/Die gute Seite" (28: No space left on device)
Dec 02, 2019 11:12:30.772 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Sportfreunde Stiller/B Seiten" (28: No space left on device)
Dec 02, 2019 11:12:30.792 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Die Ärzte" (28: No space left on device)
Dec 02, 2019 11:12:30.793 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Die Ärzte/Früher - der Ausverkauf geht weiter" (28: No space left on device)
Dec 02, 2019 11:12:30.904 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Die Ärzte/Runter mit den Spendierhosen Fremder" (28: No space left on device)
Dec 02, 2019 11:12:30.926 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Die Ärzte/Debil" (28: No space left on device)
Dec 02, 2019 11:12:30.932 [0x7fb636522700] ERROR - [Notify] Failed to add watch for "/var/services/homes/plex/Music/Musik_Alt/Deutsch/Die Ärzte/Geräusch CD 2" (28: No space left on device)

This is easy to increase but requires a bit of math.

  1. First, get the total number of directories in use for your media (movies, series, music, and photos). For each share containing media:
    a. File Station.
    b. Left Pane
    c. Right-click the share
    d. Properties
    e. Write down the number of folders it finds.

Example:

When done collecting the number of folders in use:

a. Add 32768 to the value
b. Divide by 32768
c. Add 1 to the the Integer result (No fractions here)
e. Multiply by 32768
f. Use this final result. (integer part only)
g. If the number of folders you are using is less than 8192, stop here unless you are about to add a lot more media.

We do this because we want a multiple of 32768 slots to be allocated. It allocates kernel memory on a memory boundary and allows for future growth.

Create a Scheduled task you will run ONE TIME -OR- when DSM updates and you need to increase the table again.

Here is how it will look in Task Scheduler:

  1. Create a Scheduled Task
  2. User defined script

a. Create the task

b. Declare it to run one-time Today only

c. Paste in the contents but use your values.

# This is an example only.   Use your actual result below
echo 's2s_watches_max=262144` >> /etc/synoinfo.conf

When complete,

  1. Run it
  2. Restart DSM

Plex Media Server Logs_2019-12-04_12-07-05.zip (10.0 MB) Thanks for your help, but I tried it with this code:

echo 's2s_watches_max=262144` >> /etc/synoinfo.conf

I also used a smaller value than 262144 but it still stocks at one Folder.
I looked up my plex folder within my media and it has 5784 Folders within 111308 Files.
Is there any other possible solution you can give me?

Thanks in advance.

I have under 900 folders, and am still having daily crashes.
Plex Media Server Logs_2019-12-04_17-40-49.zip (3.4 MB)