Plex regularly unavailable but shows as running on Qnap

Hey @ChuckPa - I hate to name-drop, but you’ve spoiled me in the past! First… Happy Father’s Day, brother. Hope I’m not catching you during downtime.

For the last month (maybe longer), I’ve frequently had Plex be no longer available on the client end (LAN, WAN, or thru VPN), yet the Qnap App center shows it running, and process shows active CPU use (albeit, usually <5%).

Resolution is to stop the service and then restart it. Normally that works the first time, but sometimes requires multiple restarts.

I thought I’d found the culprit last week when I noticed very little free memory remaining due to my Radarr installation using nearly all of the memory. But, it just happened now, and Radarr is using normal memory amounts - and memory is currently 2.9GB used out of 7.68GB.

So, as per our previous dialogs, I’ve attached the PMS log directory in its entirety. I’m hoping that the last entries will reveal what is happening. As of right now, I have not restarted it and it still shows off line.

This is not urgent, as I can get it to come back up. So whenever you have time and are back on the clock, let me know your thoughts…

Thanks!

Edited to add: after looking at the log files, I see this:

Jun 16, 2019 12:07:35.244 [0x7f688a410700] DEBUG - PubSub: Got notified of reachability for async identifier c40e7ffd-6e50-433b-b074-0bca0ecc2eb9: 1 for 173.170.20.48:32400 (responded in 1 seconds)
Jun 16, 2019 12:07:41.284 [0x7f683bd11700] DEBUG - NAT: UPnP, found device <http://192.168.1.1:1990/WFADevice.xml> with private address <192.168.1.71>
Jun 16, 2019 12:07:41.284 [0x7f683bd11700] DEBUG - NAT: UPnP, not an IGD: <http://192.168.1.1:1990/WFADevice.xml>.
Jun 16, 2019 12:07:41.285 [0x7f683bd11700] DEBUG - NAT: UPnP, getPublicIP didn't find usable IGD.
Jun 16, 2019 12:07:41.285 [0x7f683bd11700] WARN - NAT: PMP, got an error: Not Supported by gateway.
Jun 16, 2019 12:07:42.695 [0x7f683bd11700] DEBUG - Job running: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/CrashUploader' '--directory=/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Crash Reports/1.15.4.994-107756f7e' '--version=1.15.4.994-107756f7e' '--platform=Linux' '--platformVersion=QTS 4.3.5.0760' '--serverUuid=0c28f96454f433b59ec374d80e70f7e9d967094d' '--userId=eric.junk@tab-md.com' '--sentryUrl=https://sentry.io/api/1233455/minidump' '--sentryKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' '--vendor=QNAP' '--model=x86_64' '--device=TS-451+'
Jun 16, 2019 12:07:42.715 [0x7f683bd11700] DEBUG - Jobs: Starting child process with pid 22881

I have UPnP turned off on both the Qnap and the Asus router behind which it sits… Of course, I’m probably barking up the wrong tree…

Just a quick ping to bring this back up… Hope @ChuckPa is still around.

I thought I was on to something with the UPnP error, but I cannot find anything on my network that actually has UPnP enabled.

Just this afternoon, I found Plex unresponsive, using nearly 6GB of my 8GB of memory. I used the App Center to stop the service. It took about 5 minutes for it to finally stop. On restart, it was back to 100mb mem usage and responsive again.

I’m not entirely convinced it’s a Plex issue vs. a Qnap problem, but I’m hoping the logs previously uploaded are a bit more telling.

Thanks!

Eric

Well, hoping someone is able to help (@ChuckPa would be great :slight_smile:)

Just today, Plex was once again using nearly 5GB. I shut down PMS and after restart it was back to 100MB. What could be causing this?

Sorry for missing. Reading logs now.

Please update to something 1.16.x (preferably latest)

You show

Jun 15, 2019 21:43:15.457 [0x7f688afc8700] INFO - Plex Media Server v1.15.4.994-107756f7e - QNAP TS-451+ x86_64 - build: linux-x86_64 qnap - GMT -04:100:

They fixed some memory leaks since then.

I would also like you to drill down into the PMSLibShare into Plugin Support/Databases.

please look and see if you have a large WAL or SHM file .

If you do, then we’ve found it.

No worries about delay. I already feel like I’m abusing our relationship by dropping your name each time I get into trouble… :wink:

That said, treat me like I’m a total newbie… Where is the PMSLibShare found? I’ve got QPKG>PlexMediaServer>Library, but nothing specifically what you’ve cited.

NM… Found it… QPKG>PlexMediaServer>Library>Plex Media Server>Plug-in Support> Databases

Nothing huge, but I did restart PMS shortly after reaching out with my post this evening. I suppose I can check this if the mem goes vertical again.

This gets me pointed in the right direction. Thank you!

Yes please. Keep an eye on that as well as memory utilization after upgrading to 1.16.2 (for the memory leak fixes they found)

Will do. I don’t quite understand how I wasn’t on the most current PMS version. I regularly get the orange nag banner that indicates an update is available, and there wasn’t one. I had to manually go to the download page and look for the latest version.

FWIW, QNAP support recently closed a trouble ticket and said my NAS was heavily infected with Malware. I had stability issues (outside of Plex) but nothing obvious that had me thinking malware. In fact, I had Macafee running, and then moved to the built-in protection - and both came back clean. The tech installed “Malware Remover” which found a crap ton of baddies. It’s reporting clean now (after several reboots).

One of the symptoms of the malware was that it disabled QTS from checking for latest firmware updates (which is what prompted my helpdesk ticket). Perhaps that had something to do with the lack of Plex update notice?

In any case, I will keep an eye on this in the coming days. Thank you again for your help.

Eric

Hello @ChuckPa - Just had another episode of PMS running but not being able to access it (either directly on the LAN or via Plex.tv). QNAP resource monitor shows low CPU and memory usage, so I think the upgrade to 1.16.x fixed the bloating memory issue.

However, unless I stop and restart PMS, it’s effectively off-line.

I’m attaching the entire logs directory in hopes there is something glaringly obvious.

Thanks again for your help.

Yep. glaring was right :slight_smile:

Database optimization got turned off somehow (Scheduled tasks) or the system isn’t running when tasks are scheduled to run.

Manually optimize the DB and restart pms

Jul 13, 2019 19:18:53.334 [0x7fcc1c1ce700] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/24067?checkFiles=1&includeBandwidths=1&offset=-1&X-Plex-Incomplete-Segments=1&X-Plex-Session-Identifier=rfo2ulfnf7c4pm18m0qxbv76
Jul 13, 2019 19:18:53.335 [0x7fcc1c1ce700] DEBUG - Auth: authenticated user 3802792 as axmeone
Jul 13, 2019 19:18:54.090 [0x7fcc1c1ce700] WARN - SLOW QUERY: It took 1490.000000 ms to retrieve 1 items.
Jul 13, 2019 19:18:54.134 [0x7fcc1c1ce700] DEBUG - It took 90.000000 ms to retrieve 2 items.
Jul 13, 2019 19:18:54.263 [0x7fcc1c1ce700] DEBUG - It took 60.000000 ms to retrieve 0 items.
Jul 13, 2019 19:18:54.265 [0x7fcc1c1ce700] DEBUG - We're going to try to auto-select an audio stream for account 3802792.

Awesome… Thanks.

I went to scheduled tasks and see:

So, unless you turned it on, it’s somewhere else, or it isn’t respecting the check box, there may be something else going on?

And for the newbies who may be reading this… How do I manually optimize the DB? And how do I verify that it is scheduled to run?

Sorry to be such a pain. I’m hoping this is it.

ETA: Found the manual optimize under library options:

image

to make sure it’s actually ON.

Off - save
On - save

I have seen it miss because of updates

I actually did that just in case. Chuck, you are a gentleman among men. I appreciate you more than you know. I’d send another gushing atta boy to the main email, but I think they’d consider me a stalker. Thanks (till next time)

Take care and enjoy!

Have a great weekend.

Hello @ChuckPa! 8 days… That must be some kind of record :wink:

This evening PMS became unavailable again. QTS shows it’s running at near 0% CPU, and only 60-ish MB of memory. For a quick fix, I figured I’d just stop it via the app center. And, after a few seconds, the app center reports it as stopped - however, the resource monitor shows it very much still running. Short of rebooting the QNAP, I don’t know how else to get it to shut down.

Resource monitor:
image

But don’t tell the App Center:

image

ETA: Using the App Center to restart Plex solved the immediate connectivity issue.

For now, I’ve zipped the entire log file (PMS>Library>PMS>logs hoping, once again, that the culprit shows itself. For some reason the zip file is now nearly 50MB… substantially larger than previous uploads, and very painstakingly slow over my 1mbps DSL upload pipe. And it keeps failing at about 3% uploaded. I’m assuming there’s a max file size for the forums?

Edit to add: I’m going to upload the zip to my google drive and provide a link when it’s done…

If QTS / App Center is misreporting that, I can look but something isn’t right. I don’t see it misbehaving for me (but it never misbehaves when you’re watching for it. haha)

The status function is called by App Center to see what it’s doing. Since you see the processes, status will return “running” to App Center so I am understandably confused.

Unfortunately, those logs you sent up do not show Plex Media Server.log

It might be easiest for you to use Settings - Server - Troubleshooting - Download Logs
and attach the ZIP here directly.

After I get it, you can go back and remove it or I can

Midnight owl, too, I see. Just a sec…

Boom. That was A LOT easier and smaller. FWIW, my Plex.py reported the server down at 22:53 EST… Which is the timestamp of the last files (prior to the restart).

Plex Media Server Logs_2019-07-22_00-42-51.zip (3.2 MB)

I’m sure the misreporting by the App Center is probably unrelated to Plex. I can open a trouble ticket with QNAP’s support.

But, FWIW, since restarting Plex, the process tab now show 9 elements for Plex:

I don’t recall what it is ‘normally’ but given that no one is currently logged in or streaming, is that excessive?