Sqlite3: Sleeping for 200ms to retry busy DB

Server Version#:Plex Media Server v1.40.4.8840-1f7662b1a
Player Version#: 4.116.1
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>
Sqlite3: Sleeping for 200ms to retry busy DB
I searched for newest articles,i found ChuckPa‘s tool , PlexDBRepair,
Automatic Check,Repair,Index started.

Checking the PMS databases
Check complete. PMS main database is damaged.
Check complete. PMS blobs database is OK.

Exporting current databases using timestamp: 2024-12-28_17.02.21
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Runtime error near line 1912868: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912870: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912871: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912872: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912873: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912874: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912877: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Error 1 from Plex SQLite while importing from ‘./dbtmp/library.plexapp.sql-2024-12-28_17.02.21’
Cannot continue.
Repair failed. Automatic mode cannot continue. Please repair with individual commands

NOW i have no idea how to do @ChuckPa please help

You definitely have database damage.

In this situation,

  1. Start the tool
  2. Enable the IGNORE option
  3. Now AUTO.
    – It will still complain but will also continue
  4. When complete, HONOR command (turn off IGNORE)
  5. AUTO again if you wish but should be done

If you still have problems, you should consider the REPLACE and use one of the backups

i will try it now

Exporting current databases using timestamp: 2024-12-28_21.42.07
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Runtime error near line 1912883: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912885: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912886: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912887: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912888: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912889: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Runtime error near line 1912892: UNIQUE constraint failed: fts4_metadata_titles_icu_docsize.docid (19)
Importing Blobs DB.
Successfully imported databases.
Verifying databases integrity after importing.
Verification complete. PMS main database is OK.
Verification complete. PMS blobs database is OK.
Saving current databases with ‘-BACKUP-2024-12-28_21.42.07’
Making repaired databases active
Repair complete. Please check your library settings and contents for completeness.
Recommend: Scan Files and Refresh all metadata for each library section.

Backing up of databases
Backup current databases with ‘-BACKUP-2024-12-28_21.51.20’ timestamp.
Reindexing main database
Reindexing main database successful.
Reindexing blobs database
Reindexing blobs database successful.
Reindex complete.
Automatic Check, Repair/optimize, & Index successful.

As you said, everything is fine. Thank you very much

1 Like

Be advised,

I’m currently rewriting the entire Selection logic.

It will be much more usable as well as only checking AFTER you pick the one you want.

@38113

DBRepair v1.10.0 is published should you need it

iwill try it :pray: Thank you for the new version

now there is a new problem,PSM docker is still running ,but the PSM can not respond,open it in win show 503 Service Unavailable ,open it in app show offline ,and cpu 100. error like this,[CreditsDetectionManager] BufferingLineReader: failed to read line (error: -1) - #37 by Zillur . I don’t know how long it will be again,NOW only Restart will be ok.

Need logs. can’t tell what’s happening with only a des cription but it sounds like it’s hung up on a bad video file.

:pray:…0000000

Please turn off VERBOSE logging. It makes reading the log file much more difficult.

There are a lot of HTTP 503 reports in the log

Jan 10, 2025 10:16:04.948 [23406204357432] DEBUG - Completed: [127.0.0.1:42060] 503 GET /identity (1027 live) #1459b 0ms 290 bytes
Jan 10, 2025 10:16:10.007 [23406206466872] DEBUG - Completed: [127.0.0.1:42074] 503 GET /identity (1027 live) #1459d 0ms 290 bytes
Jan 10, 2025 10:16:15.056 [23406206466872] DEBUG - Completed: [127.0.0.1:42258] 503 GET /identity (1027 live) #1459f 1ms 290 bytes
Jan 10, 2025 10:16:20.098 [23406206466872] DEBUG - Completed: [127.0.0.1:42262] 503 GET /identity (1027 live) #145a1 0ms 290 bytes
Jan 10, 2025 10:16:25.142 [23406204357432] DEBUG - Completed: [127.0.0.1:57752] 503 GET /identity (1027 live) #145a3 0ms 290 bytes
Jan 10, 2025 10:16:30.188 [23406204357432] DEBUG - Completed: [127.0.0.1:57766] 503 GET /identity (1027 live) #145a5 0ms 290 bytes
Jan 10, 2025 10:16:35.233 [23406206466872] DEBUG - Completed: [127.0.0.1:50598] 503 GET /identity (1027 live) #145a7 0ms 290 bytes

The server is in maintenance mode and something keeps tapping on it.

I think you might have a deeply corrupted database (not reporting errors but also not functioning)

Can you rename /config/Library/config/Library.save
and create a new instance to test ?

when i rename it ,the docker can not run it,how to do it?

i change it back,docker also can not run :psyduck_confusion:

00
Restart Unraid,docker run,i turn off VERBOSE logging.

I had to go do some research.

The credit detection issues where addressed in the 1.40.0 and 1.40.1 releases.
You’re currently using 1.32.8

You might want to consider updating.

Do I have to upgrade my version? Is there any other way? I heard that the new version of scraping is not very user-friendly

What do you mean? Ive been using the plex agent/scanner for years and works great as long as you follow the proper naming schemas.

I upgraded the version

the CPU usage rate has always been 100.Server offline.

Can you get into the command line and do the following -

  1. Drill down in the file system to where the server is stored.
  2. Rename “Library” to “Library.keep”
  3. Start a new TEST server
  4. Give it the name “TEST” so it doesn’t conflict with the production server name.
  5. Add ONE library section, with all the bells & whistles extras turned off
    – no Credit Detection
    – no Intro Detection
    – no Thumbnails
  6. Let this scan and finish loading up
  7. Now check CPU utilization at idle.
  8. If it’s down to where it belongs (1-5% at idle), ONE at a time, re-enable the three above features
  9. Let it build that data up (it will take a bit but with only one section, shouldn’t be too long)
  10. Check CPU utilization at idle again when complete.
1 Like