Plex Fails to Download Meta and Images Data

Server Version#: 1.19.3.2740 centOS 7
Player Version#: irrelevant

The server recognizes new movies and TV shows when scanning libraries, but it fails to fetch meta data and images for the new titles. It has been like this for a about a week. I waited for a new update to solve the issue, but that didn’t happen. I tried it with new (2020) and old (2017) titles and got the same results.

When I click on the edit icon (pen) of a movie, I can see the Poster and Background images in the popup window, but the server does not assign them to the movie. I have to choose the images manually and click on SAVE CHANGES button. Even with that, the server keeps showing the spinning icon over the poster image. This persistent trial of fetching the data drives the server’s CPU usage high. Here is the top processes running on the server right now:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
 9206 plex      20   0 1062868  52356   5620 S  39.1  0.7   1:20.14 Plex Scrip+ 
 7352 plex      20   0 2926188 351548  20948 S  35.9  4.4   1:19.99 Plex Media+ 
 7403 plex      35  15 2029204  64180   6748 S  24.0  0.8   0:53.54 Plex Scrip+ 

As for the agents for “Plex Movie” tab, I have these from top to button: Local Media Assets (Movies), CineMaterial, Fanart.tv and finally Plex Movie.

For “The Movie Database”, I have these agents enabled: Local Media Assets (Movies), Fanart.tv, The Movie Database, and Plex Movie.

I hope there is a solution for this problem!

I’ve had the same problem since today

1 Like

DEBUG (not VERBOSE) log files are needed

1 Like

Please find the logs in attachment.
Plex Media Server Logs_2020-05-04_17-19-37.zip (103.3 KB)

Thanks for the logs.

Easy to diagnose but you’ll need perform repairs.

May 04, 2020 17:18:36.472 [0x7f68d8237780] DEBUG - MyPlex: updating with 26 access tokens
May 04, 2020 17:18:36.473 [0x7f68bffff700] DEBUG - Grabber: Cleaned up 0 decrepit directories in 0.0 sec.
May 04, 2020 17:18:36.475 [0x7f68bffff700] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
May 04, 2020 17:18:36.475 [0x7f68bffff700] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
May 04, 2020 17:18:36.475 [0x7f68bffff700] ERROR - SQLITE3:(nil), 11, statement aborts at 6: [select tags.id as 'tags_id', tags.parent_id as 'tags_parent_id', tags.metadata_item_id as 'tags_metadata_item_id', tags.tag as 'tags_tag', tags.tag_type as 'tags_tag_type', tags.tag_val
May 04, 2020 17:18:36.475 [0x7f68ad7fa700] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
May 04, 2020 17:18:36.475 [0x7f68d8237780] DEBUG - Opening 1 database sessions to library (), SQLite 3.26.0, threadsafe=1
May 04, 2020 17:18:36.476 [0x7f68ad7fa700] DEBUG - HTTP requesting GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx&includeProfiles=1&includeProviders=1
May 04, 2020 17:18:36.476 [0x7f68bffff700] ERROR - Thread: Uncaught exception running async task which was spawned by thread 0x7f68d8237780: sqlite3_statement_backend::loadRS: database disk image is malformed
May 04, 2020 17:18:36.476 [0x7f68bdffb700] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
May 04, 2020 17:18:36.476 [0x7f68bdffb700] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
May 04, 2020 17:18:36.476 [0x7f68bdffb700] ERROR - SQLITE3:(nil), 11, statement aborts at 6: [select tags.id as 'tags_id', tags.parent_id as 'tags_parent_id', tags.metadata_item_id as 'tags_metadata_item_id', tags.tag as 'tags_tag', tags.tag_type as 'tags_tag_type', tags.tag_val
1 Like

Thank you. I followed the steps for Linux given the linked page, but now I have 0 size
com.plexapp.plugins.library.db file! dump.sql is 56032487 bytes though.

Here is a log of the commands I ran with output:
Check:

$ systemctl stop plexmediaserver.service
$ cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
$ sqlite3 com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
$ sqlite3 com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
$ sqlite3 com.plexapp.plugins.library.db "PRAGMA integrity_check"
*** in database main ***
On tree page 72 cell 1: Rowid 0 out of order (previous was 0)
Fragmentation of 2 bytes reported as 0 on page 72
Page 73: btreeInitPage() returns error code 11
Page 11589: btreeInitPage() returns error code 11
On tree page 11632 cell 14: Child page depth differs
On tree page 11632 cell 15: Child page depth differs
Page 12073: btreeInitPage() returns error code 11
On tree page 12003 cell 70: Child page depth differs
On tree page 12003 cell 71: Child page depth differs
Page 12486: btreeInitPage() returns error code 11
On tree page 12416 cell 70: Child page depth differs
On tree page 12416 cell 71: Child page depth differs
Page 13731: btreeInitPage() returns error code 11
Page 14203: btreeInitPage() returns error code 11
Page 15319: btreeInitPage() returns error code 11
On tree page 15320 cell 1: Child page depth differs
Page 76: btreeInitPage() returns error code 11
Page 25292 is never used
Page 25770 is never used
Error: database disk image is malformed

Repair:

$ sudo cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
$ sqlite3 com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
Error: no such index: index_title_sort_naturalsort
$ sudo sqlite3 com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
$ sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
$ rm com.plexapp.plugins.library.db
$ sqlite3 com.plexapp.plugins.library.db < dump.sql
$ chown plex:plex com.plexapp.plugins.library.db

I still haven’t turned the server on yet.

If the database is damaged that much, you might try an alteration of the repair process: Correction to Plex's "Repair Corrupt Database" Help Page

Otherwise, there are 3 backups with older snapshots of your database. Try the repair procedure on them as well.

1 Like

Thank you.

I restore the database from 20 of April and applied the repair steps to it. I then started the server, scanned the libraries, and everything seems working perfectly now :slight_smile:

Glad it’s working again!

Unless you already do, try and avoid the most common reasons for database corruption:

  • storing the Plex data folder on a network share
  • “hard” shutdown of the server device, while plex server is still running
  • letting the volume with the Plex data folder on it, run “full”
1 Like

Actually, the server experienced a power failure about a week ago. That might be reason of the db corruption. I’ll buy a UPS in order to avoid such incidents in the future.

Good plan!

1 Like

DB recovern didn’t help me.
Metadata takes 10 minutes per film. Subsequently, covers are not displayed

can anyone help mePlex Media Server.log.zip (129.5 KB)

Cable from Vodafone and a cable Fritz box?

I have a FritzBox 6591 Cable Modem/Router.
the problem has existed for 2 days. I had a power cut

There is a bug which might affect you:

1 Like

Thank you. that was the problem. It works

Keep in mind that your maximum download speed might drop a lot by disabling that setting.

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