Server Version#: 1.14.1.5488
Player Version#: various (Windows 3.83.1, web, android, Amazon Alexa on Echo)
I am new to using Plex, but it seems I have been able to correctly set up my PMS on a Raspberry Pi 3 B+ for music playback on the players mentioned above. I am able to play locally as well as remotely, and am only using this server for music.
The issue I have is that sometimes the server becomes unavailable. (after 24 hours or so, maybe more, usually with very light usage)
If I turn on the monitor for the Raspberry pi, there is just a black screen, so it seems the whole thing has crashed.
I am new to Rasperry pi and Plex, so I am not sure if there are some power-saving settings on the Pi that I am not aware of (ie, it is turning off because it is idle) or if there are some PMS settings I can change to keep it from crashing the Pi (?).
I Googled this issue and most solutions provided are that it is related to power or heat.
I have a heatsink on the Pi, and it does not sound right to me that PMS would overheat the Pi anyway.
I have the CanaKit 2.5A USB Power Supply with Micro USB Cable and Noise Filter, so it should be getting enough power, and I believe CanaKit is considered “official.”
The Pi is only being used for PMS, my music is stored on a 256 GB USB (3.0) flash stick, the Pi is connected by 5Ghz wifi, and that’s about it.
I would think 2.5A is enough power for this.
If anyone who is knowledgeable about running PMS on Raspberry Pi has any advice for keeping my server running, I would appreciate it.
PMS cannot crash your Pi if it’s a healthy system. It can only trigger a defect in your setup (e.g. overheating). That’s why you have to identify what’s wrong with your hardware.
Till you have found the hardware problem it’s always recommended to disable the CPU hungry tasks, as e.g. discussed here:
Thanks very much for the info.
In that case, I am hoping it is overheating from the tasks you mentioned as I have installed nothing else to my Pi other than PMS.
I will try disabling them and seeing how it goes.
Btw: please google RPi 3B+ crash. There are many other users discussing similar problems. Most users had their RPi replaced by the seller and this fixed the problem. It appears there is a bad batch of RPi 3B+ out there.
Well, just tonight I ran updates/upgrades, moved the USB flash drive to another port (maybe it’s generating heat?) but the whole thing crashed within 3 hours this time.
Could you tell me how to find some logs and what I should be looking for?
Thanks.
Edit:
So here’s another question: How much memory is PMS supposed to be using?
After rebooting after this latest crash, I opened up Task Manager and one of the Plex tasks has a steady climb in RSS. As of right now it is over 460 MB (just about half) and increasing.
If this keeps up, could this be causing the crashes?
2nd Edit:
Leaving it on overnight, the memory used by that one Plex task rose to 532 MB (and seems to still be increasing, but slower) and total memory usage is now 698 MB of 927 MB. Wondering if this is normal…
3rd Edit:
RSS used by the Plex task rose to 779.7 MB, overall Memory usage went to 876 MB of 927 MB and the whole system froze (cannot move cursor, CPU and Memory usage reports are not updating/fluctuating). This crash took just about 10 hours from the last boot.
Is this safe to conclude that this memory issue is causing my problems?
I have no idea how to go about fixing this, so if anyone has any tips I would appreciate it.
Thanks.
Sorry for multi-posting, but I have changed the title now that I have identified a problem (maybe THE problem) and hoping this gets some visibility.
If anyone knows anything about this RAM issue detailed above or has any tips for how to go about troubleshooting, I would really appreciate it.
Thank you.
Have you upgraded your PMS to the current 1.15.2 release?
Please post the output of ps aux | grep -i plex so we can actually identify the process that consumes all of your memory. The Task Manager screenshot is not much of a help However, Linux typically just kills a process if it requires too much memory. In theory, only PMS should stop, not your RPi.
Thanks for the follow up.
Yes, I have upgraded to the latest version.
Well, I tried to open chromium so I could copy/paste the output and the Pi froze up (memory usage from the plex task was already very high).
Earlier, messing around with the displays showed me that the culprit Plex task was also called DLNA Server or /sbin/init splash, depending on the display option I selected.
I was also asking on reddit for some tips, and a user there suggested that I try to use systemd to limit the RAM usage of Plex to 650 MB. (sudo systemctl edit plexmediaserver.service) This did not seem to do anything as it continued to increase beyond that.
I will try to post with the requested output by posting directly from my Pi.
Edit: here is the output: (taken shortly after rebooting)
Interesting. Do you use DLNA or only normal Plex clients? DLNA is a legacy feature of Plex and not often used anymore (and may have bugs cough). If you do not need it, please disable it.
You know, I didn’t know what DLNA was until this morning when I started googling around for it. I am pretty sure I do not use it, as I play everything through Plex Players (website, Windows program, Android app, Alexa skill).
I disabled it, and it seems like everything is still playing properly.
It has been about 6 hours since the last reboot after disabling DLNA and the RAM usage seems very normal and minimal. The DLNA server task does not seem to be present.
Memory used by cache seems to be high, as does virtual mem, but that may be normal.
I will just have to wait it out and see how it goes. If nothing freezes or crashes in the next 24 hours, then I guess the DLNA ram usage is what my problem was (hopefully it is that simple).
Thanks very much for your help. I will update and let you know how it goes.
If you have time at some point to get diagnostics to register the issue - please adapt the script here Server Crashes While Loading EPG Data to capture memory from launch and collect logs zip periodically
I don’t want to jinx it, but it has been over 48 hours since I have disabled DLNA and there have been no freezes/crashes or any RAM issues.
That could very well have been the cause of all my trouble. Thanks for your help troubleshooting. I will update if anything falls apart.
If I do have trouble again, I will get some logs to submit. If I have time this weekend, I could re-enable DLNA for a while and get some logs if that would be helpful.