Unable to add more movies

Server Version#: Latest binhex-plex version
Player Version#:
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>


Hi everyone,

I have been running my Plex server for many years now and never had any problems until recently. However, in the past week, I have not been able to add any new movies to my Plex library. I can’t seem to get more than 1250 movies, no matter what I do. I have tried just about everything I can think of myself, thus I’m here now.

What I have already tried:

  • Renaming all new files to the same format as every other movie
  • Not relying on auto scanning
  • Manually triggering a scan (which does nothing either)
  • Clearing old unused data
  • Optimizing the database
  • Running a new instance of Plex Media Server, thus completely ignoring all previous database metadata content

But no matter what I do, I can’t get past 1250 movies.

Anyone here able to help me?

We’ll definitely need to see the server’s DEBUG logs ZIP file (containing the individual files)

There is no set limit of how many items you can add so there must be an error preventing this. It might also be the image.

We’ll know more after we see what you have.

Here is the log files :slight_smile:

Plex Media Server Logs_2024-05-24_13-58-45.zip (2.2 MB)

MODERATOR EDIT: Databases removed (privacy)

See:

May 24, 2024 12:32:04.561 [22759550909072] DEBUG - Image transcode cache directory: "/config/Plex Media Server/Cache/PhotoTranscoder"
May 24, 2024 12:32:04.562 [22759550909072] DEBUG - Transcoder: Cleaning old transcode directories.
May 24, 2024 12:32:04.562 [22759550909072] ERROR - Error creating directory "/transcode": Permission denied
May 24, 2024 12:32:04.563 [22759550909072] DEBUG - MyPlex: using cached data for request for https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx
May 24, 2024 12:32:04.563 [22759550909072] DEBUG - MyPlex: updating with 14 access tokens

THIS is probably the root cause. (DB Corrupted/damaged)
There’s possible ways around this but success not 100% guaranteed.

May 24, 2024 12:32:05.003 [22759550909072] DEBUG - [DatabaseFixups] Destroying metadata item 43296 (tv.plex.agents)
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] SQLITE3:0x80000001, 11, database corruption at line 84326 of [a29f994989]
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] SQLITE3:0x80000001, 11, statement aborts at 11: [SELECT idx, start_block, leaves_end_block, end_block, root FROM 'main'.'fts4_metadata_titles_icu_segdir' WHERE level = ? ORDER BY idx ASC] database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] SQLITE3:0x80000001, 11, statement aborts at 88: [delete from metadata_items where id=?] database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Exception inside transaction (inside=1) (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/MetadataItem.cpp:849): sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Exception inside transaction (inside=1) (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/MediaItem.cpp:908): sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Exception inside transaction (inside=1) (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/DatabaseFixups.cpp:202): sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Fixup 42DatabaseFixupsGarbageCollectTransientItems threw an exception: sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.032 [22759482538808] DEBUG - [EventSourceClient/pubsub/1May 24, 2024 12:32:05.003 [22759550909072] DEBUG - [DatabaseFixups] Destroying metadata item 43296 (tv.plex.agents)
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] SQLITE3:0x80000001, 11, database corruption at line 84326 of [a29f994989]
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] SQLITE3:0x80000001, 11, statement aborts at 11: [SELECT idx, start_block, leaves_end_block, end_block, root FROM 'main'.'fts4_metadata_titles_icu_segdir' WHERE level = ? ORDER BY idx ASC] database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] SQLITE3:0x80000001, 11, statement aborts at 88: [delete from metadata_items where id=?] database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Exception inside transaction (inside=1) (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/MetadataItem.cpp:849): sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Exception inside transaction (inside=1) (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/MediaItem.cpp:908): sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Exception inside transaction (inside=1) (/home/runner/actions-runner/_work/plex-media-server/plex-media-server/Library/DatabaseFixups.cpp:202): sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.004 [22759550909072] ERROR - [DatabaseFixups] Fixup 42DatabaseFixupsGarbageCollectTransientItems threw an exception: sqlite3_statement_backend::loadOne: database disk image is malformed
May 24, 2024 12:32:05.032 [22759482538808] DEBUG - [EventSourceClient/pubsub/139.162.158.105:443] Read HTTP reply header.
May 24, 2024 12:32:05.032 [22759482538808] DEBUG - [EventSourceClient/pubsub/139.162.158.105:443] MyPlex: We appear to have regained39.162.158.105:443] Read HTTP reply header.
May 24, 2024 12:32:05.032 [22759482538808] DEBUG - [EventSourceClient/pubsub/139.162.158.105:443] MyPlex: We appear to have regained

Possible:

Use my tool, With container fully stopped,

  • Use the --sqlite and --databases command line options to manually configure it as if it were in the container
  • Now you can try a ‘auto’
  • It there is physical record damage, that will fix it.
  • if it’s corrupted data records (garbaged), you can have it try restoring backups but you might be better erasing the DBs and starting fresh.

Well that very well could be the problem, i will get back to you when i have tried it, will do so tomorrow, but thanks man, really appreciate it

I’m not the best working in command line, or anything like that, but how dose the tool work?

As shown in the documentation, the tool provides (automates) all the command line work needed to accomplish the desired task(s)

If you look in the README.md, you’ll see how I give examples of verything.

I got a buddy of mine to help, but with no luck. So I just made a new fresh Database scan, and that seems to have work, but thanks for your help it was very much appreciated