Ooh, that’s a good spot. Looks like some files got moved erroneously (probably as part of the tedious file-moving when doing the Plex Dance). I’ve moved them back up a level. Thanks for that.
Doesn’t explain the McMafia thing, but certainly not ideal. Would be nice if Plex flagged up inconsistencies like this…
A further look I see many network errors/warnings(unable to connect, download, etc), to access rights(can’t read, can’t write), slow database queries, etc…
Also I’m seeing the dreaded get_iplayer alot. I’m not sure if LMA is disabled here, or if it is, PLEX will not honor the setting but for what ever reason it is PLEX is trying to match a show call get_iplayer
I had to reboot my NAS earlier today, so the read/write errors may be from that. But Plex definitely has the correct permissions, so that’s probably a red-herring. Will wait for all of the metadata to populate (it’s still processing after yesterday’s Dance) and then maybe re-do a Plex Dance for a couple of specific seasons, and make a note of the time when I started that, to give a ‘clean’ log.
I think you have many, many issues going on at the same time. This is not as simple as one or two shows not matching up. Just for comparison… My logs vs your logs…
My com.plexapp.agents.thetvdb logs: 102 errors from 11448 entries.
Your com.plexapp.agents.thetvdb logs: 1368 errors from 22059 entries.
My Plex Media Server logs: 381 errors and 37 warnings from 216856 entries.
Your Plex Media Server logs: 7462 errors and 27624 warnings from 37705 entries .
So how does one a) identify these errors and b) resolve them, without trawling through Plex logs? Is there some way of saying “show me stuff I need to fix with my configuration”? Or is it all guesswork and low-level digging?
It could, of course, be that I have a more eclectic/obscure set of shows for which metadata is missing…
Here is a thought:
Could it be that the NAS is so busy that it never executes the Bundle cleaning operation successfully?
Your logs are only covering a very short time span, which might mean that the server has had no time to finish any of its operations.
The Plex Dance must be performed after all library updates and metadata fetching has been finished. It won’t succeed when there is still anything like this going on.
Only after that, try performing the Plex Dance again.
And after the dance, add only one (smaller) show back, for now. Wait until Plex has fetched every bit of metadata for it, before issuing any other commands. (This may take several minutes.)
I’ll try it. But this is extremely tiresome. Is there a faster way to rebuild the library/cache/bundles etc from scratch?
Is there an interim solution - i.e., manually deleting (say) the Metadata folder from within the plex folder, to force the same effect as a plex dance without having to keep moving files about etc?
I’m tempted to just delete the entire Plex installation and reinstall, disable LMA, and then add the library and run the media scan, to see if that solves it.
@“Mark Otway” said:
I’m tempted to just delete the entire Plex installation and reinstall, disable LMA, and then add the library and run the media scan, to see if that solves it.
But still, this might be really an issue with a very busy NAS device.
If you really go through with it, I recommend to leave the Plex Server alone afterwards for 20 minutes or so.
When you are adding back your tv shows, start by doing it one at a time. Give it plenty of time to fetch metadata etc.
Adding back shows one at a time is not really practical, given I have 300+ shows sitting on the NAS.
Why would a busy machine have this sort of effect though? I can understand it taking a long time for shows to be picked up and metadata to be loaded, but it makes no sense at all that the NAS being busy would result in shows being mis-identified - that would imply a pretty significant issue/bug in the Plex server code.
Grrrr. Do a fresh install but now I can’t sign into the Plex server - it keeps redirecting me back to the Plex site and then showing me “Looking for Server”… :’(
@“Mark Otway” said:
Why would a busy machine have this sort of effect though? I can understand it taking a long time for shows to be picked up and metadata to be loaded, but it makes no sense at all that the NAS being busy would result in shows being mis-identified - that would imply a pretty significant issue/bug in the Plex server code.
Because if PLEX at one time mis-identified a show and the NAS did not complete a full purge of the series(s) then you are adding back the same content PLEX has already indexed, so it will think you just moved the content around and it will reuse the existing info.
That on top of the shows you had in other shows’ folders. All these will compound the issue.
Mark,
What language are you using? What’re the settings for your server? When I opened your logs, I was profoundly surprised. I know these are written in English.
I think you’ve got a file system corruption problem.
I did find, in your older logs (which were English), The database is overloaded. (too busy) for everything to work correctly. We can take care of that but we will need work through this step at a time.
I am running a standard Synology OS, UK English, with the Plex server set to UK English. Which log file was that unicode in?
This evening I did a full, completely clean brand new installation of Plex. Completely deleted the entire Plex folder and installed from scratch. I set up the agent with LMA completely disabled for both films and TV, and then kicked off the media scan. The same thing has happened - I have 32 seasons listed under McMafia, made up of a random selection of shows from various folders within the directory tree. As far as I can see this is just bad matching by Plex, pure and simple. The folders and shows it’s misidentified are all correctly named, and it shouldn’t be scanning them for any metadata, unless I’m misunderstanding.
I can’t see how the DB can be overloaded as nothing other than the initial scan is running, and Plex should manage that itself. I also can’t see how this can be file corruption - I’m running raid 6, do regular SMART scans and all my shows play correctly and are identified properly by both Sonarr and Kodi.
I’ll upload a fresh set of logs in the morning when the scan has completed and we’ll see if we can figure out what Plex is doing wrong.
Mark,
That was file Plex Media Server.log. Plex Media Server.1.log was ok. Whatever happened it was in those final moments before you captured that posted log.
The DB gets ‘overloaded’ because it’s a SQLITE3 db. The ‘overload’ is because of how SQLITE3 stores tables. It is a single-file database engine therefore as tables grow they will naturally fragment. The problem occurs when normal operations occur, such as adding media, and those tables become fragmented. Sqlite3 must follow the internal links to find the data. This causes delay. When PMS doesn’t get the reply within the expected time limit a warning is raised. It results in SLOW QUERY messages in the log files. This is the start of a potential avalanche within PMS.
DB query returned later than expected. All subsequent DB queries are now delayed
Some processing occurs
DB is queried again which results in another ‘slow’ response.
When all data is finally in hand, the part of PMS waiting for the data will have ‘timed out’ resulting in a failure. The most common is “No metadata”
To avoid this scenario on a Synology, you must first remember the CPU isn’t all that fast.
Add a library section to the DB
Let it match the files
Optimize Database manually
Repeat steps 1-3 for each Library section you are adding.
When done, optimize manually one last time.
What you’ve done in this is maintain locality-of-reference. The different table rows are nice and compact . You don’t have, for example, ‘music’ records physically interspersed with ‘movie’ or ‘episode’ rows.
Hi Chuck,
Your description makes sense, although it’s a bit worrying. If that’s the case, it means that despite being a mature, and reasonably expensive product, Plex has some serious architectural flaws which means it can’t hope to work properly.
My Synology is a 916+ with 8GB of RAM, so it’s an x64 process running on a quad core Linux box, and really should not be having any issues with performance.
Regardless of that, a decently written app would see DB read/write operations fail under load and would immediately retry/back off to ensure transactional integrity is maintained. If Plex just ploughs on, spiralling requests until a transaction storm occurs (an ‘Avalanche’, in your words) then the product is clearly flawed.
Some things don’t add up here though.
If it’s a load issue, why is it that the same files are always affected? Surely it should be random throughout the library. As it is, I see the same set of misidentified shows being grouped under McMafia.
If Plex really is struggling with DB access under load and queries are failing, why doesn’t it just fail to write the data, leave those shows unidentified, and come back to them later? ie after a certain length of time, the shows should all be identified correctly. What I see is permanently incorrect data that seems fixable only by the tedious and time consuming application of the Plex Dance.
If these errors are known to be an issue, why doesn’t Plex a) tell me about them and b) give me the opportunity to resolve them after the fact? Currently the only way I’ve discovered them is by happening to notice a bunch of extra seasons under a show which I know to have just one season. Where’s the error report or warnings? Surely I can’t be expected to grep the logs regularly to find out my server is broken?
How do I actually fix these shows? Currently it seems like my only option is to get a pencil, trawl through the 30 misidentified series/folders, writing them down, and then do the Plex Dance for each one, hoping Plex identifiew them correctly this time. That’s going to take a couple of hours, and it’s time I can’t afford (and that’s assuming it works - I currently have no reason to think that if I do that Plex will correctly identify these shows).
All of this has me wondering whether I’ve made a mistake moving back to Plex - which I did after 2 years of flawless Kodi operation using the same NAS and set of media files. I switched back due to Plex finally supporting HW transcoding on Synology, but if what you’ve described is in fact the state of the Plex architecture, it feels like I should request a refund for my Lifetime pass, and move back to using Kodi. Plex is supposed to be a mature, stable product that makes everything Just Work.
PS: where are the Plex staff here to help diagnose the problem? It’s great being helped by forum members, but with a paid product I’d have expected somebody from the Plex support or development team to have looked into this by now.
I am Plex staff and work primarily in Customer Support. With respect to Synology NAS systems and Linux at large, I am also on the development team.
My purpose / responsibility here is to support you and get PMS working again. Should we find an actual software problem, I am your advocate in getting it resolved as well as, if possible, providing you a workaround until it is properly corrected by the Engineering team.
I ask we not enter into the “paid support” discussion here. The software itself is free. The additional services available with a Plex Pass are what you have subscribed to. That’s how they structured it. It’s been that way for as long as I’ve been around.
Regarding your Syno,
With this apparent level of corruption, we need to make certain the machine and drives are solid. I would like you to do the following:
Run extended S.M.A.R.T tests (Storage Manager) on each HD and examine the Health results. In those specific results, I would like you to look at values 5,196, 197, and 198 (shown below). If they are not Zero, the disk is about to fail. Any “Offline Uncorrectable” (198) means failure has begun. Other than total hours and usage values, you should have zeros in the same fields as I do.
Next, verify volume integrity . Under Disk Group or Volume (depends on your configuration) , You will find Data Scrubbing. Please “Start Data Scrubbing”. Yes, this will take time but will find and correct any data errors on your drives.
Thanks Chuck. I wasn’t aware you are Plex staff and a developer. Might be useful if your profile/tags were more clear about this.
I’ll update you with the Smart health results later. I run scheduled monthly data scrubbing and the disk was clear the last time it ran.
Happy not to enter into the paid support discussion; I understand exactly what Plex pass is for and the value behind it (although that might lead me onto the numerous bugs and issues with Android sync, but maybe let’s not go there here ;)).