Plex being really unreliable and slow...

Been a huge fan of Plex for 2 - 3 years now but finding myself at wits end. Last throw of dice before I move on so I really hope someone can help me.

The issue is simple - I’m finding Plex to be really unreliable and spending far too much time doing Plex support. Once again, I can’t properly stream through various devices (including Samsung TVs running Plex Client, Mac Mini also running PHT and PC using browsing). Plex shows half the shows as blank icons and trying to stream a show more often than not results in errors.

I’ve renewed the Plex Server (was on a DS409, migrated to Mac Mini, now on a new DS1516+). I have moved the database, run an integrity check and compact and copied it back. I’ve even deleted the music library from Plex to reduce what’s being indexed but STILL keep finding Plex runs fine and then so slow as to be unusable. My family rely heavily on it and I’m finding myself doing support every week.

Anyone got any suggestions of what more I can do to troubleshoot? Adore the product when its working but now seems also more trouble than its worth.

Thanks!

1 Like

Did you followed, https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database ?

It used to be slow for me too, but I tried to repair the database and it worked. The integrity check didn’t return any error for me either, but I still did the dump. I think that Plex can’t deal with huge libraries. So, you must do this repair thing as a routine. Maybe, you can create a script to automate the process.

If I may clarify,

Whenever you make large changes (additions, deletions, or moves) with your Library, the SQLite database can become lopsided. If you look at the log files you’ll see “SLOW QUERY”. This is the tell-tail sign. To correct this, use the ‘Optimize Database’ mechanism which is located under the ellipsis next to Libraries in the left pane of the Dashboard.

Thanks for the suggestions guys. Yes, I did an integrity check on the db and it had no errors but I did the repair anyway. That was a week or so ago.

Not sure what would be a huge database, I have around 400 shows and 1,400 movies. No pictures or music. Add a few items each week but I wouldn’t say there are huge changes made at once.

I uninstalled Plex server on my NAS and reinstalled it and Plex is running properly, for now. The folders that yesterday wouldn’t even render the icons havent seen any changes in months (kids shows) but now they are working normally again.

Would the fact that I’ve migrated the db from being on a NAS to Mac to another NAS have any relevance to this situation?

I guess if it keeps grinding to halt the only next step is a complete wipe and create the DB again from scratch? Annoying to loose all the watched media history though.

Thanks again, appreciate the input and suggestions.

Would the fact that I’ve migrated the db from being on a NAS to Mac to another NAS have any relevance to this situation?

Yes, You are carrying around extra, no longer used, data. This would not show in an integrity / error check.
What is needed is to Update the Library, Empty the Trash, and clean the bundles. When again quiescent, Optimize the database. This guarantees all references from the old installation have been properly transferred (view states, etc) and the new media locations have taken their rightful place with the old having been removed in these steps.

As an analogy, The first step is picking up your mail. The second is getting your mail forwarded. The last step is when mail finally arrives without those forwarding stickers on them :slight_smile:

Thanks ChuckPa, however I’ve already followed those steps. And Plex works fine 75% of the time and then throws all its toys out the pram and won’t render half the folders or play a lot of the media. Quite frustrating.

@ChuckPa said:

Yes, You are carrying around extra, no longer used, data. This would not show in an integrity / error check.
What is needed is to Update the Library, Empty the Trash, and clean the bundles. When again quiescent, Optimize the database. This guarantees all references from the old installation have been properly transferred (view states, etc) and the new media locations have taken their rightful place with the old having been removed in these steps.

Then please do the following. I would like to see what it’s whining about.

  1. Settings - General . Enable Debug logging. Make certain Verbose is not enabled.
  2. Do anything, browsing your media wise, which will recreate the what you are seeing.
  3. As soon as you do, navigate to Settings - Server - Help and Download Logs
  4. Attach the ZIP file it gives you here with your next post

PMS makes errors very well known in the log files.

Thanks. I have logging (non verbose) turned on. Since I uninstalled and reinstalled Plex its been working fine (didn’t recreate the DB). Fingers crossed. If it starts struggling again I’ll grab the logs. Which log is most relevant? I assume ‘Plex Media Server.log’

Go to Settings - Server - Help - Download Logs. You are given a ZIP file in the best format for us.

Have you checked Generate video preview Thumbnails. That can cause a huge slow down. Server / Library settings.

@ChuckPa said:
Go to Settings - Server - Help - Download Logs. You are given a ZIP file in the best format for us.

Yes, I did that but the available logs (seems to be a current one and 5 previous versions) don’t date back to when I last experienced the slowness. Will grab a copy immediately next time.

@Gdr56 said:
Have you checked Generate video preview Thumbnails. That can cause a huge slow down. Server / Library settings.

Thanks, I’ll do that next time. I haven’t check them in the past. One point is that the thumbnails all work until I get the slowness when Plex doesn’t render folder icons and playback is very slow or keep failing.

Ok, so Plex became really slow and unresponsive again. Checked the NAS and the CPU was running at 90+. This didn’t appear to settle down even after closing the Plex Client and waiting a while. Rebooted the NAS and Plex is working ok again. I grabbed the logs just before the reboot (directly from the NAS, I couldn’t get to the server settings using the Plex interface). Can someone advise on what I should be looking for here?

Also noticed Plex isn’t scraping metadata reliably now. But I should probably start a separate thread for that.

From your logs, I see the scanner and photo transcoder running. I see a large number of ill-named files.

A number of them begin with RST and then have the IMDB title. I cite the scanner entries in Plex Media Server.log.1 May I ask why you have named them this way?

Otherwise, the processing speeds are quite respectable for this unit.

This having been said, you are generating BIF files (chapter thumbnails) for everything in your library. Perhaps you were unaware of this? BIF files require the transcoder’s involvement (not just the scanner).

Feb 06, 2017 09:04:33.542 [0xe9b35b40] DEBUG - Request: [127.0.0.1:44310 (Loopback)] PUT /video/:/transcode/session/bif/progress?progress=27.0&size=-22&speed=4.0&remaining=466 (11 live) Signed-in Token (charsiufan)

Your previous file log rollover Plex Media Server.log.1, which conflicts with the current, shows the scanner trying to match content of the format:
Please help me understand how this discontinuity occurred?

Hi ChuckPa

Thanks for the feedback. To answer your questions in turn:

A number of them begin with RST and then have the IMDB title. I cite the scanner entries in Plex Media Server.log.1 May I ask why you have named them this way?

My movies folder is subdivided into subfolders based on the starting letter of the movie. The subfolders are named:

Within the subfolder the movies are named to match the IMDB listing:

This is because there are around 1,700 individual movie folders and when using a uPNP media player that doesn’t have Plex support it can be very slow to render and to scroll through all 1,700 subfolders when presented as one long list.

This having been said, you are generating BIF files (chapter thumbnails) for everything in your library. Perhaps you were unaware of this? BIF files require the transcoder’s involvement (not just the scanner).

No, I wasn’t aware this was causing slowness. Should I turn this off?

Thanks for the advice.

If you don’t want them then yes, turn them off. They only show when you’re seeking along the timeline.
They do take up a fair amount of space in your library. Generating them is a frame by frame task, picking out screenshots at specific intervals.

@ChuckPa said:
If you don’t want them then yes, turn them off. They only show when you’re seeking along the timeline.
They do take up a fair amount of space in your library. Generating them is a frame by frame task, picking out screenshots at specific intervals.

If they are causing an issue then I guess I’d better turn them off.

Is the folder structure making Plex run slow?

What I observe with your directory structure is a lot of scanner activity. Specifically, it’s almost continuous.

Given there was a major discontinuity with your first logs, would you mind having PMS ZIP up a new set please?

The elapsed time since the first set should be more than enough to give me a better picture.

Regarding BIF files, I personally don’t use them. I find them too expensive to generate on my NAS (Synology).

If you choose to turn them off, you can also delete them when editing each library under the Advanced tab. I do recommend first turning off Index Generation in your server settings.

@ChuckPa said:
Given there was a major discontinuity with your first logs, would you mind having PMS ZIP up a new set please?

Attached. Thanks

If you choose to turn them off, you can also delete them when editing each library under the Advanced tab. I do recommend first turning off Index Generation in your server settings.

Handy tip. Deleted all thumbnails from each library and emptied trash.

We’re getting there!

Please now go 'Optimize database"

If you look in “Plex Media Server.log” as you sent.

Feb 07, 2017 22:51:21.497 [0xe8847b40] DEBUG - [Notify] Now watching /volume1/Video/Drama/DCI Banks/Season 2
Feb 07, 2017 22:51:21.497 [0xe8847b40] DEBUG - [Notify] Now watching /volume1/Video/Drama/DCI Banks/Season 3
Feb 07, 2017 22:51:21.502 [0xdcfffb40] WARN - SLOW QUERY: It took 210.000000 ms to retrieve 50 items.
Feb 07, 2017 22:51:21.502 [0xe8847b40] DEBUG - [Notify] Now watching /volume1/Video/Drama/DCI Banks/Season 4
Feb 07, 2017 22:51:21.503 [0xe8847b40] DEBUG - [Notify] Now watching /volume1/Video/Drama/DCI Banks/Season

The database is still lopsided. “Optimize Database” corrects this. The DB always behaves this way after moving, adding, or deleting a large quantity of items. The biggest killer is music… e.g. 1000 CDs all at once is a lot for the typical desktop PC to handle notwithstanding the little CPU in the NAS>