**Strange, untypical unexpected error loading this library**

I encounter this error message with one specific library, and only when viewing it by title or rating. All other options such as year or date added work flawlessly. I repaired the library database according to the instructions on this forum, but this did not change a bit.

Maybe some entries in the sql-database are missing but I know nothing about this stuff. Anyway, I would like to try to repair the database before building it up from scratch.

  1. activate debug logging (not ‘verbose’!)
  2. quit Plex Server
  3. wait 1 minute
  4. start Plex Server
  5. wait 5 minutes
  6. fetch log files and attach them here

Or inspect them yourself. Take a look at the Plex Media Server.log file and seek for messages about database corrupt or malformed.
If you find these, you may have to repair your database.
https://support.plex.tv/articles/201100678-repair-a-corrupt-database/

Hi,

thanls for the very quick reaction. I attach the log-files below.

I looked at them but could not find anything meaningful to me.

Also, I did repair the database according the that article 201100678

but no success.

Thanks in advance,

jurgen

Plex Media Server Logs_2018-08-07_22-31-09.zip (507 KB)

You did not enable ‘debug logging’. So the logs don’t contain many useful data, except
there are a lot of these
Aug 07, 2018 21:04:55.391 [0x70000b0c8000] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 1 items.
Which indicates that either there is an issue with an aging/failing hard drive
or the computer is under heavy load or is simply too old or its RAM is too small.

Did you recently add a lot of photos into Plex?
How much free space is left on your system drive? (or wherever /Users/plex/Library/ is residing)

Oh, right, I checked PMS logging but forgot to save the changes …

So here is the log, with a lot of stuff.

By the way, I do not have any photos on plex.

Plex is running on a mac mini from mid 2011

with a 256GB SSD and enough free disc space.

jurgen

Plex Media Server Logs_2018-08-07_23-52-22.zip (516 KB)

Is that little machine running hot?
Because Intel CPUs throttle themselves, when they’re not cooled sufficiently.
A machine that old may have accumulated quite a bit of dust and fluff in its cooling system.

Well, I have been running this machine in exactly this setup

for several years now, with no such problems.

On the other hand, the last few days were really hot

here in Germany. So what would be the effect of this?

How can I test that this may be the cause?

Run the same database on a different machine?

j.

As I said above: dust and fluff

These two things together may have brought it to the tipping point.

Did you install the SSD yourself? If so, you may already have experience with opening the machine. So you could take a look at the state of the fan and cooling sinks.

I’m sure there’s a way to determine whether thermal throttling is occurring in OSX or not. But I’m no Mac expert.
Maybe you can use this:
https://software.intel.com/en-us/articles/intel-power-gadget-20

Okay, that would be an exercise for a lazy afternoon.

But what I do not understand: How could this affect

the way the library is read by PMS? The file itself

does not seem to be corrupt.

j.

If the cpu is stopping itself, this affects the speed of every operation on this computer.

I thought so.

However, everything else is running as smoothly as ever.

So I doubt that this is a real problem.

j.

Your previous logs showed database accesses taking several seconds for very simple operations.
That is a problem, whatever the cause is. Because it will slow down browsing your library and in extreme cases slow down database queries so much that the rest of Plex will throw a ‘timeout’ error.
Which is exactly what you have observed with this ‘unexpected error’.

Your latest log doesn’t show any of these ‘slow DB’ messages, btw. You might at least want to browse your libraries for a bit before fetching logs.
(Or you fetched your last logs during the night, where it was a bit cooler…)

Okay – thanks.

Just two questions:

  1. Where in the log do I find these accesses which sometimes take so long?

  2. Is there a way to rebuilt the database so that everythin g is working correctly?

j.

I posted already above how such a message looks like

Rebuilding the database doesn’t yield an improvement, because you already did that by performing the database repair procedure.
And why would it work, if the source of the problem is an overheating machine?

Well, I transfered the whole PMS app libary folder to a much

faster machine – and the problem persists. By the way I still would

like to know which entries of the log indicate excessive query times.

So the question still remains: is there any way to get

the library to sort by title when ostensibly the database is not corrupt?

Just in case, I append the log files from that faster imac.

j.

Plex Media Server Logs_2018-08-08_17-26-24.zip (523 KB)

The log file still doesn’t show any kind of library browsing activitiy.

WARN - SLOW QUERY

Well, it’s nothing of that kind.

I played a lot with various view of the library.

For instance, by title A-Z throws an error, but

by title Z-A works except for a few last entries with “A…”

So I do suspect it is a database error.

Looking at library.db in DB Browser I see a weird entry

which I can’t get rid of within PMS it seems: it’s

“Nocturna” which should have been “Nocturnal Animals”.

So my question now is:

Is it possible to edit library.db external – in this case

delete this entry – and go back to PMS?

j.

Well, it was indeed nothing of this kind.

I deleted that strange line containing “Nocturna”,

saved, and then repaired the database according to

https://support.plex.tv/articles/201100678-repair-a-corrupt-database/

And everything is fine now.

No overheating or slow computer or something like this.

And checking a corrupt database with the usual means is also not enough, it seems.

j.

That is an interesting find!
Can you see if the corresponding video file has an unusual character in its file name or its embedded ‘title’ tag?

Well, I think this database entry just got corrupted for some reason.

I removed the video file from the library but this did not eliminate

the database entry as this was now under a diffrerent name.

The video file looks completely innocent: Nocturnal Animals (2016)

and is not any different than hundreds of other files.

It seems the point isjust an ill-formed database entry which is not

detected by the usual checks. And when the database is read in the

“right” direction the problem shows up only at the very end of the list.

The other way the database does not load at all.

j.