Plex server randomly stops responding even thought it shows as still running (Ubuntu 14.04 LTS)

I have cleared the logs and asked the same person to play the same thing…I am seeing this:

WARN - [Plex for Xbox One] Player: Excessive buffering detected; unknown

but nothing else yet…

The info is showing “Direct Play” but another interesting thing (not sure if it matters) is that on my PlexWatch I have four streams going right now. Three of them I can see all of the information on them via plexwatch (state, stream, audio and video) except for the one that we think might be a problem. In fact, I am watching the same exact episode on Chrome and it is showing everything just fine.

[UPDATE]

I just had my son start to watch something on his XBOX ONE and plexWatch cannot see any of the details of that stream. I assume now that that is an unrelated issue (or maybe plexWatch just cannot see that info) but it appears like it might have nothing to do with the plex server crashing.

I’ve got some of the guys helping me now. It might not be the XB-1 but is definitely a particular file. The XB-1 is reporting back that it wants the server to slow down (for whatever reason). We’re looking at that too.

THANK YOU!! Let me know what I can do (if anything) to help!!

There is one thing you can do… It would entail you you running a ‘filtering tail’ on the log file.

It would be sudo tail -F /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log | grep -iv mismatch | tee some_log_file_pathname

Some_log_file_pathname is anywhere you want the copy of the log to go to.

What we’re looking for is all the log file entries which aren’t “mismatch” errors.
This will give us all the other traffic but filter out (the ‘-v’ option) those which contain the word ‘mismatch’.
We save that to a file. In it, we’ll actually get the media id’s of the files played.

Then, when it does hang, you’ll have the list.

From there, we can backtrace to each piece of media and find it.

https://127.0.0.1:32400/library/metadata/put_item_id_here?checkFiles=1&X-Plex-Token=your_x-plex-token

This is the reverse lookup from what happens when you click on something and ‘View XML’.

OK, I launched screen and am running the tail now. I will let you know as soon as it crashes again and upload the logs!

root      7303  0.0  0.0   9224   616 pts/1    S    13:51   0:00 tail -F /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log
root      7305  0.0  0.0   9192   688 pts/1    S    13:51   0:00 tee /root/plex_logs/plex_newlog.log

I assume nothing will go in that log file but errors correct? Nothing is being logged into that file right now.

Are you seeing the output as I described? You should see what is normally placed in your log files except that this log file does not ‘rotate’ at the 5MB mark

Weird, I was seeing no output at all so I killed the tail -F command and then the file had some entries, but it stayed at zero as long the tail was actually running.

Is the Plex Media Server.log supposed to show everything that is played on the Plex server? Just doing a normal tail on that file does not show anything when I actually start or stop watching a movie or TV show. Just stuff like this:

Oct 30, 2016 14:40:42.289 [0x7ff8ab3ff700] INFO - It's been 16634356 seconds, so we're starting scheduled library update for section 2 (TV Shows)
Oct 30, 2016 14:40:50.519 [0x7ff8b07fe700] WARN - NAT: PMP, got an error: Not Supported by gateway.
Oct 30, 2016 14:42:14.219 [0x7ff8bb3ff700] ERROR - JobManager: child process killed by signal: 9 (Killed)
Oct 30, 2016 14:42:14.244 [0x7ff8bebff700] ERROR - handle_stream_read error 32 Broken pipe
Oct 30, 2016 14:42:26.927 [0x7ff8bebff700] ERROR - handle_stream_read error 32 Broken pipe
Oct 30, 2016 14:42:26.929 [0x7ff8bb3ff700] ERROR - JobManager: child process killed by signal: 9 (Killed)
Oct 30, 2016 14:42:30.944 [0x7ff8bb3ff700] ERROR - JobManager: child process killed by signal: 9 (Killed)
Oct 30, 2016 14:42:30.963 [0x7ff8be3fe700] ERROR - handle_stream_read error 32 Broken pipe
Oct 30, 2016 14:43:47.832 [0x7ff8be3fe700] ERROR - handle_stream_read error 32 Broken pipe
Oct 30, 2016 14:43:47.923 [0x7ff8bb3ff700] ERROR - JobManager: child process killed by signal: 9 (Killed)
Oct 30, 2016 14:45:23.821 [0x7ff8bb3ff700] ERROR - JobManager: child process killed by signal: 9 (Killed)
Oct 30, 2016 14:45:23.841 [0x7ff8bebff700] ERROR - handle_stream_read error 32 Broken pipe

tail will output everything that gets sent to the file it is monitoring. The -F option tells it to watch for the file being rotated (Force reopen) .

If the log file record does not contain the word ‘match’ it will be output. that’s how grep works. type man grep to read the electronic manual for it.

I know the grep works but I was not sure how the tee affected it since I have not used that at all. I guess I was not waiting long enough, I see stuff getting written to the new file now!

Thanks!

tee is pretty quick. It’s a per-line splitter. Tee’s output file will be buffered but console i/o is immediate, compliments of fflush(stdout) :slight_smile:

Hey there.
I am seeing similar behavior with my setup.
Witch is Synology DS916+, running DSM 6.0.2-8451 Update 2, and plex Version 1.2.5.

Almost all my clients are Apple Tv v.4.

It works most of the time, but sometime mid stream both local or remote the stream stops and the server becomes “offline”
Then i cant reach it either remote or local.
When i login to my Synology the plex package is still stating running, bit if i look in Activity monitor is say the process is sleeping.
If i then stop the package and start it again nothing is wrong?

Pls help.

EDITED; Logs Deleted again

You are seeing what everyone else sees.

Can you run the script I wrote here https://forums.plex.tv/discussion/238200/1-2-2-randomly-stopping-on-ubuntu-16-04/p3 ?

(open a SSH connection to your Synology, sudo -su root to gain root access, start the script and either put it into the background (&) or leave the ssh session running until it becomes non-responsive?

When it does stop responding, please gather the script’s logs and the PMS logs and attach them here.

Then i had a crash once again this time on the newest pms 1.2.6.

Attached are pms logs + plex_connection logs.
Hope it helps.

Good Monring ChuckPa -

OK, I have attached the log file you had me create along with another netstat. The netstat issue is still there and my server issues seem to be getting worse.

I am now having an issue where I can watch a movie on Chrome, my Samsung 7 and my ipad, but that exact same movie (on the exact same home network) will not play on my Roku3 or Roku4 and it (the Roku) throws an error saying “We are unable to play this video, make sure the server is running and has access to this video”. I am now seeing that problem over and over with different shows and movies. I have never seen that issue before, it generally would either play on everything or not play on anything. Of course, once I shut down the plex service and restart it, that problem goes away.

I did upgrade to the latest Plex version the other night when it became available. I am now running plexmediaserver_1.2.6.2975-9394c87. None of the problems were solved.

Hi ChuckPa -

It looks like I am having the exact same issues on 14.04 LTS as 16 as seen here:

Would you agree…? If so, I will just move this over to that thread…