PMS loops forever retrieving metadata for some movies

Server Version#:1.13.8.5395

Many movies that I add to my Plex library (but not all) are provoking an endless metadata refresh loop. The media files are dropped into place, Plex notices them, an entry for the new movie appears in the Web client, and the metadata fetching begins. Writer, director, cast are all retrieved and displayed, but the movie poster never appears, and the spinning glyph never stops spinning. The only way to stop the loop is to “Unmatch” the entry (which leaves the entry in place but with no metadata) or to move the media files out and then empty the trash. Moving the files back provokes the same misbehavior.

These problematic movies all have entries in The Movie Database and aren’t unusual in any obvious way.

These same movies don’t provoke the problem when added to the Movies library on a separate remote Plex server. The problem only occurs in the Movies library on my local Plex server, and also occurs if I create a separate “Movies Test” library on the same server and add any of these movies to it. So the problem is confined to my specific local server.

This is happening on MacOS 10.14 (Mojave).

I reproduced the problem after a server restart and I’ll attach the logs that were created or touched after the restart. (If more are needed I can provide them.)

I’d greatly appreciate any assistance with this. Thanks.

Plex Media Server Logs_2018-10-28_00-14-43.zip (1.2 MB)

Try optimizing your pms database.

Aha. Ran “Optimize Database” and saw this in the log:

Oct 28, 2018 10:39:25.914 [0x700006fe7000] DEBUG - Database optimization: starting.

Oct 28, 2018 10:39:25.914 [0x700006fe7000] DEBUG - Activity: updated activity eda002a7-a967-4a7f-9e97-38a1575ccf9a - completed 60% - Optimizing database

Oct 28, 2018 10:39:27.365 [0x700006fe7000] ERROR - SQLITE3:0x700005c745b0, 11, database corruption at line 59739 of [fc49f556e4]

Oct 28, 2018 10:39:27.365 [0x700006fe7000] ERROR - SQLITE3:0x700005c745b0, 11, statement aborts at 1440: [analyze] database disk image is malformed

Oct 28, 2018 10:39:27.369 [0x700006fe7000] ERROR - Thread: Uncaught exception running async task which was spawned by thread 0x7000059e6000: sqlite3_statement_backend::loadOne: database disk image is malformed

Oct 28, 2018 10:39:33.894 [0x700006fe7000] DEBUG - Activity: Ended activity eda002a7-a967-4a7f-9e97-38a1575ccf9a.

So there’s DB corruption.

Unfortunately, when I follow the DB repair procedure described here:

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

I end up with a zero-length com.plexapp.plugins.library.db file. The SQL dump looks fine at least superficially (and has over two million lines it) but the DB that results from running sqlite3 on it is nevertheless empty.

Is there anything else I can try to repair the DB?

Fixed. I managed to repair the DB by replacing the “ROLLBACK;” command at the end of the SQL with “COMMIT;”.

That seemed a little risky but the metadata misbehavior has stopped.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.