Endless buffering on Raspberry Pi 3

server-raspberry-pi

#1

Hello, I have recently installed Plex Media Server on a Raspberry Pi 3 B+. The server runs well and is able to play content with no buffering until 2 items have been played. Once a third item is played, after about 3-5 minutes of playback the video will begin buffering and will not stop (I've left it alone for hours to buffer and it never finished). If the video is exited and selected again, it will resume but will only play for about a minute before it begins buffering once again. The same thing happens if the video is exited and another is selected instead. The only thing that resolves the issue is a full reboot of the Pi; however the issue will return once 2 items have been played. I am streaming via ethernet on my local area network (although the problem also exists with remote streaming) to my Macbook Pro 2015 running Plex Media Player, everything is Direct Play with no transcoding, so that shouldn't be part of the issue. I don't think it's a problem with my router either, as I was previously running a Plex Media Server on a Windows 10 desktop on the same network and experienced no issues whatsoever. I've checked the Plex logs and there doesn't seem to be anything fishy, does anybody know why this might be happening? I can provide logs & other information upon request. For reference, I am running Raspbian Lite (CLI only) with kernel version 4.14.30-v7+. Thank you!


#2

Please first update your Raspbian (with apt). Linux 4.14.30 has known stability issues and there is a new kernel available.


#3

@uglymagoo said:
Please first update your Raspbian (with apt). Linux 4.14.30 has known stability issues and there is a new kernel available.

This fixed the problem last night, but I just tried to watch something today and it’s back again, this time after watching one item.


#4

Pleas tell us more: where is your media and how is it mounted on your Pi? How did you install Plex? What version of Plex Server and Plex player are you using? Is a restart of the plexmediaserver via systemctl not sufficient to fix your issue? What power supply do you use? Anything special …

And server logs would be great: journalctl -u plexmediaserver, sudo dmesg and Plex server logs:

https://support.plex.tv/articles/200250417-plex-media-server-log-files/


#5

My media is stored on a 750GB Samsung HDD in a USB enclosure, mounted via ntfs-3g. I installed Plex using the instructions for Raspberry Pi 2/3 on this forum; the only other thing installed on my Pi is ntfs-3g. A restart of plexmediaserver via systemctl will allow the content to play for a few minutes before the buffering returns. I use an Adafruit power supply that came with my Pi when I bought it.

Plex Media Server Version: 1.13.0.5023
Plex Media Player Version: 3.47.1

journalctl -u plexmediaserver: https://pastebin.com/raw/KmdJ2WSJ

sudo dmesg: https://pastebin.com/raw/DK9cq8Gr

Plex Media Server.log: https://pastebin.com/raw/Rtp6C08p

com.plexapp.system.log: https://pastebin.com/raw/8muQeVd4

Please let me know if you need any further information.


#6

Please post all Plex Media Server.log s or the complete archive. The Plex Media Server.log that you have provided contains only the messages after your last manual restart. There is nothing helpful there.


#7

Sorry about that. Here are all the Plex Media Server.logs. I wasn’t able to upload them to pastebin as they are too large.


#8

The only interesting thing I have seen in your logs is an occasional “database locked” error. Did you move your Plex Library / Application Support Directory from /var/lib/plexmediaserver to another location (e.g. your external drive)?


#9

I haven’t moved that directory, it’s still in /var/lib/plexmediaserver. However, I think I’ve learned something about this issue that may be helpful. It seems that the buffering occurs after a certain amount of data rather than a number of items (which was probably just coincidental). Last night I attempted to watch a movie and it stalled and began buffering about halfway through, which was at around 1h of playback time.

Is there anything else that could be causing the “database locked” error?

Some other information:
-my media drive is an old reformatted laptop drive in a Kingston USB enclosure, not sure if that would cause an issue with the Pi. It is not externally powered.
-I only use SSH from my Macbook to interface with the Pi if that makes any difference.
-the issue was totally resolved after I used apt to switch to another commit branch (I was somehow stuck on a 4.14.30 branch) and rebooted; after this, media played flawlessly for hours until the next day when I woke my Macbook up from sleep and my SSH connection had been terminated by a broken pipe. After this, the issue returned.

Thanks again for the help.


#10

I’m experiencing the same problems as grumblegoose, and I’m at my wit’s end trying to figure out why this is occurring.

I just purchased a Pi 3 B+, and installed all of the latest software including Raspbian 4.14.34-v7+ (full version). PMS 1.13.0.5023 was installed as a package from dev2day.de. I was running PMS fine on a Raspbian 3 B without this problem.

I normally use the Plex client on my Samsung Smart TV (Plex for Samsung 3.3.4) on Tizen 2.4.0, which is where we initially noticed the buffering; however, I experience the same buffering problem when I point my browser to PMS on my Macbook Pro. The buffering occurs even when all clients are running with DirectPlay and DirectStream enabled.

My Pi 3 B+ is wired into my router, where as my Samsung TV and Macbook Pro are both wireless.

I’ve attached journalctl and dmesg outputs, as well as the last two Plex Media Server log files in the zip.

Any insight would be appreciated.

Thanks


#11

I had a look at your log files. (I should say there are people with sharper eyes than mine.)

I want to focus on one particular device and file. I see you are using chrome as web browser to watch “When Harry Met Sally” at Jun 02, 2018 07:44. That file is located at “/media/pi/bigboy/plex/movies/”. The format is mkv and the name of the file suggests there are subtitles involved. Right?

What the follows in the log suggests to me that the stream is transcoded.
“PUT /video/:/transcode/session/hsvykz8azu732khfpg1w22sc/8dc65ae9-0478-4035-88de-67a105a9c968/progress?progress=48.1&size=-22&remaining=19996”

But I can not spot why?

Can you please post the xml info on that movie file.

Moreover, is “bigboy” a mounted HDD or a volume mounted from a server.

Can you please open a terminal window to your Pi, while watching that movie in the browser, and get the output of ps axe | grep Plex.

And please switch off Verbose logging, that gives to much noise.

I do not think that it is transcoding when you are using your TV set. May be you are probing the bandwidth limit of your total setup.

-=-=-=

And maybe @uglymagoo will transfer this into a new thread.


#12

One of the issues in the Raspberry Pi kernel that could cause such problems with an RPi 3 B+ is still not fixed. Only the RPi 3 B+ is affected. I am afraid I cannot recommend the RPi 3 B+ at all at the moment :expressionless: The kernel is still buggy as hell.


#13

I agree this is not a problem with PMS software. Running on Pi 3 B+, all videos regardless of format will buffer. There is something up at a lower level. I can run videos on a Pi 3 B with the same versions of PMS and operating system, and it works fine.


#14

I am not sure but I think this is my issue as well. I went with the new RPi 3B+ because it spec’d out with better throughput to the network. My setup is the RPi connected to a powered USB hub with two attached drives. I have it hard wired to my network. I have been connecting to my Plex using an Xbox one via the Xbox client. This runs great for a day. Then I have to reboot my RPi as it starts buffering on any video I play.

At first I thought it might have had something to do with the fact that I tried moving my library database off of the SD card and onto one if the hard drives. First attempt was via a copy of the database then used a symlink. The second attempt was via the systemd method by chuck, I would provide a link but the one I have is broken with the move to the new forum. I am now on my third install of PMS on a clean install of Rasbian (full) but headless. I also installed Samba to manage file upload from windows machines. This time I have not tried to move anything around.

I was hopeful that it was just me messing with the location of the plex database. everything was going well, things were playing nicely up until the server uptime reached around 20 hours.

I did notice in the logs that the client connection was getting dropped because of a 30 second “Jun 21, 2018 22:07:40.290 [0x67fff400] DEBUG - [CompanionProxy] player rv9ztei1glf383hesginecrd was last refreshed 20 seconds ago”

Jun 21, 2018 22:08:00.290 [0x691ff400] DEBUG - [CompanionProxy] player rv9ztei1glf383hesginecrd was last refreshed 40 seconds ago Jun 21, 2018 22:08:00.290 [0x691ff400] DEBUG - [CompanionProxy] player rv9ztei1glf383hesginecrd was not refreshed for over 30 seconds, dropping it.

I don’t know if this might help or maybe I should just break down and purchase a regular RPi 3B as it sounds like that one just works.

I have attached my server logs also.

Plex Media Server Logs_2018-06-22_00-04-42.zip (5.7 MB)


#15

I don’t know if there was an update to raspbian recently but on Friday of last week I ran apt-get update && apt-get distro-update. I believe this might have fixed my buffering issue. After this update I have been running for 3 days solid without needing to reboot the 3B+. I have been apprehensive to purchasing a plex pass because of the buffering issue.

But now feeling much more confident about my simple media setup. I bought a month of plex to test how it handles being a DVR using my HDHomerun Extend. For now I am still going to leave the media meta database on the SD card.