I am running Plex server 1.9.7.4460 on a Synology DS412+. The server has three libraries: Movies, TV Shows and Music. All are functioning fine with one very strange and very specific issue that I’ve identified. If I click on TV Shows library and then choose “Unwatched” > “TV Shows” > “By Last Episode Date Added”, I always end up with “There was an unexpected error loading this library”. If I change from Unwatched to something else, or if I change the sorting to “Date Added”, for instance, or any other field, then I get the correct results shown.
The screenshot below shows the filters that cause the error. I have enabled the debug log and looked at what is a huge myriad of json output but I don’t see anything that is an obvious error and only status:200 responses, etc. It’s a particularly noisy log. Some idea of what specifically to look for would be helpful.
Thanks Otto. I tried the db optimize. It didn’t fix the issue. I’ll set about the continued steps this evening.
I ran into a seemingly unrelated issue that has my plex completely broken. I ended up uninstalling and reinstalling it (a newer version, as it happens). The new install fixed the short term issue that had cropped up but on this fresh install (same DB) I still have the same issue in the OP.
I have had some time to do more testing. Optimising database had no effect. As a matter of fact, I’ve now been through a few fresh installations of Plex and the issue persists across freshly built installs. I have used the official Synology DSM package as well as Plex through a Docker container (which is what I am on now) and both had the same result.
I’ve looked at the logs and although I am no wizard at this, I am guessing the SLOW QUERY messages are going to be the issue. I have included two log snippets. In both logs, I started recording just before selecting the filter criteria which causes the error. In the first log, I was playing music simultaneously. The message occuring before the pause in the timestamps lead me to do a test without anything playing and I still had the same experience at the browser.
Any direction is appreciated.
Version 1.10.0.4523
PS: I am very much not an iTunes user so any log messages pertaining to it seem to me like wasted cycles. Is this something I can disable?
I should also mention that if I use my Android phone, the plex app shows me the requested criteria without an error.
The server runs very snappy and I don’t believe that, in general, performance is actually going to be the issue here. Other page loads are all great and responsive and my other device does load this set of options correctly.
I did set the Plex container to high CPU priority and assigned a full 1024GB of ram (on a 2GB nas doing little else) to make sure it has loads of resources. At present, the machine is doing almost nothing with a total system usage of 42% memory and CPU usage floating in the low single digits. The disks and volume are seeing almost not utilization and Plex is running directly on the NAS so the library files are local and not being loaded over network.
@trumpy81 I would like to find away to first flush all my logs before doing a demonstration test and uploading the files to avoid it being glutted up with all my household viewing history. I’ll figure that out and do as you suggest in the near future.
@OttoKerner I have about 380 films and 130 tv series. Some of those have many episodes, others have very few. I am not sure where Plex can tell me the total number of items definitively. It’s a large collection, but not so large that any of the other page loads have any trouble.
I have included a zip of the log files. Here’s what I did:
I shut off my plex container entirely.
I then went into the Logs directory and deleted all logs present.
Started up container and allowed plex to fully boot (waited a few minutes).
Loaded the main home index, then music library index, then TV shows already set to the offending filter.
The page sat for a while and gave back the error as expected.
I waited one minute and then fetched the logs.
I extracted the logs and replaced some unimportant data (IP, email address and server UUID) but otherwise these are verbatim from the session described above.
I can’t plug more memory into it but I still believe that the memory is a red herring. Again, I had the exact same result running bare hardware with nothing else using the machine measurably. And why only this one specific query?
Different queries generate different burdens on the database engine. Some queries are fast, some can be accelerated with ‘index tables’, but some need more processing time and/or memory than others.
For interest’s sake, I’ve recorded a quick webm of my plex shows being navigated briefly. I flipped through a dozen or so filters and you can see that every selection responds very snappy and quickly until I hit the one aforementioned filter and it just stops dead and eventually times out. I’m a software developer myself and am pretty sure this isn’t a throw-resources-at-it problem, this is something specific with this query, whether it’s just horribly optimized or something else, it should be fixable because there’s no reason a machine that can handle the rest of those requests so easily could reasonably be expected to just be unable to perform another basic query that, at most, adds another level of joining to the lookup.
@trumpy81 Could you please direct me to the GHI issue in question so I can follow it just in case?
The reason I held out for so many years using other solutions and not plex was because I didn’t want to invest my time and effort (and potentially money) into a closed source solution that might leave me high and dry when an issue comes up and no one but the company can deal with it. Fortunately I only bought 1 month of plex pass to decide whether to stay on it. It’s too bad if I’m already bumping into the major problem with closed software.
It is because of Synology’s reputation for mucking around subsystems that interfere with upstream stuff, I switched from the Syno Plex package to running latest plex in docker, removing the Syno factor. Given this, I wonder if this has to do with the processor class and some bad instruction. I get the impression pms is using sqlite for its database and presumably it’s a lookup in this DB that’s failing for us here. Do you know if plex depends on shared system sqlite libraries or whether it rolls something in itself?
@trumpy81 where can one see it verified that Plex has acknowledged/identified this bug? It would be good, after all, to make it easy to see that so that people don’t continue to report the issue.