Plex Server unresponsive after ca. 15min of streaming on Samsung TV

Hello everybody,

at first my setup:

My plex server is a docker container (Linuxserver Docker-Plex) running on a virtualized Ubuntu machine.
The host of this all is a 4 core / 8 thread i7 4770eq with 16GB RAM. So it should be enough.

Now my problem:
When I watch a movie/serie on my Samsung TV with the build-in plex app after around 15 min of flawless playback (mostly direct play) I get the message “A network error occurred” (translated from german) and my plex server is completly unresponsive. Neither my TV nor the webinterface nor the iOS app on different devices are able to connect.
Even the DLNA server isn’t reachable.

So i tried to connect to the container and checked if I’m able to ping all these devices and the google servers -> no problem.
Restarting the hole container helps, but I would also like to try to restart just the plex server, but I don’t know how I can do this.

Also waiting something like a hour also helps. Ironically DVR recordings in this time are all fine, so i doubt its a connectivity issue.

Now im kinda desperate. I hope someone can help me.

May I ask why you’re running PMS in Docker (abstraction #1) in a virtual machine (abstraction #2) when PMS works natively on Windows and OSX ?

Because first, I don’t use this machine solely for PMS. There is my Ripping docker, a Unifi Controller, TVHeadend, Freenas, TVhProxy, automated Handbrake etc. Second I don’t wan’t to use windows on my NAS/Server. And third, for my usage, the i7 would be so overkill to use it only for FreeNAS or only for Plex, so I decided to use Proxmox to virtualize everthing. Works fine so far.

Thank you for that clarification. There are several other threads of users who use Proxmox and have difficulty with PMS and container privilege levels. Candidly said, it is a mess and I don’t understand Proxmox enough to be of help.

Perhaps someone else can step in or you could ask in any of the other Proxmox threads?

Ok, so you think it is Proxmox/Docker related?

I was able to capture the log while watching a series and again after 12min the server is unresponsive.
That’s the log:

Aug 08, 2017 21:27:06.797 [0x7ff463bff700] ERROR - EventSource: Retrying in 15 seconds.
Aug 08, 2017 21:27:26.816 [0x7ff463bff700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:27:26.816 [0x7ff463bff700] ERROR - EventSource: Retrying in 30 seconds.
Aug 08, 2017 21:27:51.862 [0x7ff4633fe700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:28:16.890 [0x7ff4633fe700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:28:16.890 [0x7ff4633fe700] ERROR - EventSource: Retrying in 15 seconds.
Aug 08, 2017 21:28:26.909 [0x7ff463bff700] ERROR - CERT: Error in TLS handshake: short read
Aug 08, 2017 21:28:36.936 [0x7ff4633fe700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:28:57.022 [0x7ff4633fe700] ERROR - EventSource: Retrying in 30 seconds.
Aug 08, 2017 21:29:21.994 [0x7ff463bff700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:29:22.032 [0x7ff42effa700] ERROR - [Transcoder] [http @ 0x1f6c520] Stream ends prematurely at 443540708, should be 18446744073709551615
Aug 08, 2017 21:29:22.045 [0x7ff4363f9700] ERROR - [Transcoder] http://plex:*******@ubuntu:9981/stream/channel/650ed004bd45500392c48e8dff1d2c9e?weight=300?transcode=none: Input/output error
Aug 08, 2017 21:29:42.076 [0x7ff41afda700] WARN - Took too long (9.860000 seconds) to start a transaction on ../Statistics/StatisticsManager.h:191
Aug 08, 2017 21:29:42.076 [0x7ff41afda700] WARN - Transaction that was running was started on thread 0x7ff44dfff700 at ../Statistics/StatisticsManager.h:191
Aug 08, 2017 21:29:42.078 [0x7ff4633fe700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:29:42.079 [0x7ff463bff700] ERROR - CERT: Error in TLS handshake: Connection reset by peer
Aug 08, 2017 21:30:12.155 [0x7ff463bff700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:30:12.155 [0x7ff463bff700] ERROR - EventSource: Retrying in 15 seconds.
Aug 08, 2017 21:30:12.257 [0x7ff4297f7700] ERROR - Caught exception trying to stream file: /usr/lib/plexmediaserver/Resources/Plug-ins-42bd8c63f/WebClient.bundle/Contents/Resources/favicon.ico: write: Broken pipe
Aug 08, 2017 21:30:52.109 [0x7ff463bff700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:30:52.110 [0x7ff463bff700] ERROR - EventSource: Retrying in 30 seconds.
Aug 08, 2017 21:31:37.208 [0x7ff463bff700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:31:37.209 [0x7ff4633fe700] ERROR - CERT: Error in TLS handshake: short read
Aug 08, 2017 21:31:37.213 [0x7ff4633fe700] ERROR - EventSource: Retrying in 15 seconds.
Aug 08, 2017 21:31:37.215 [0x7ff4633fe700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:32:37.276 [0x7ff420fe6700] WARN - SLOW QUERY: It took 250.000000 ms to retrieve 0 items.

Does that mean anything to you?

Thank you for looking in your log files. It’s not often the errors within Proxmox are obvious.

You’re have networking / NAT / multiple layers of NAT issues. PMS cannot connect to Plex.tv

Aug 08, 2017 21:27:06.797 [0x7ff463bff700] ERROR - EventSource: Retrying in 15 seconds.
Aug 08, 2017 21:27:26.816 [0x7ff463bff700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:27:26.816 [0x7ff463bff700] ERROR - EventSource: Retrying in 30 seconds.
Aug 08, 2017 21:27:51.862 [0x7ff4633fe700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:28:16.890 [0x7ff4633fe700] WARN - LongPoll: Got error, closing.
Aug 08, 2017 21:28:16.890 [0x7ff4633fe700] ERROR - EventSource: Retrying in 15 seconds.

Next your database / disk I/O is horrible. Knowing now you have two layers of abstraction, Something changed and PMS can’t even contact the database in a reasonable amount of time. 1/4 second to contact the DB through the OS will prevent all operation.

Aug 08, 2017 21:32:37.276 [0x7ff420fe6700] WARN - SLOW QUERY: It took 250.000000 ms to retrieve 0 items.

Disk i/o interrupted during the transcode session

Aug 08, 2017 21:29:22.032 [0x7ff42effa700] ERROR - [Transcoder] [http @ 0x1f6c520] Stream ends prematurely at 443540708, should be 18446744073709551615
Aug 08, 2017 21:29:22.045 [0x7ff4363f9700] ERROR - [Transcoder] http://plex:*******@ubuntu:9981/stream/channel/650ed004bd45500392c48e8dff1d2c9e?weight=300?transcode=none: Input/output error

Ok, theoretically there should’nt be any type of NAT…everything is configured as bridged. But I will check that.
And the disk I/O could come from the way I configured the docker, the “Application Support” folder is placed on a share of the FreeNAS instance on Proxmox.
Well, i’ll check that too.

Thanks so far!

After changing the caching settings in Proxmox from off to writethrough the playback works fine.

But this still remains (only while watching with my Samsung TV):

Aug 09, 2017 12:54:25.433 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:54:53.434 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:55:21.434 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:55:49.435 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:56:17.446 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:56:45.446 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:57:13.448 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:57:41.460 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:58:09.461 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:58:37.466 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:59:05.467 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 12:59:33.467 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:00:01.470 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:00:29.469 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:00:57.469 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:01:25.482 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:01:53.484 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:02:21.485 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:02:49.484 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:03:17.485 [0x7fcb68ffe700] WARN - LongPoll: Got error, closing.
Aug 09, 2017 13:03:45.489 [0x7fcb697ff700] WARN - LongPoll: Got error, closing.

Streaming on my iPhone via LTE works also fine, so it shouldn’t be a problem with the connection to plex.tv.