Server Version#:1.25.6.5577
Player Version#:4.69.1
I have a rather big library with tv shows.
It’s somehow corrupted nothing would show up on the recommended tab.
I tried to delete the library completely but everytime i press the delete button it turns grey for a few seconds and come back.
After searching on the forum it appeared that it’s a DB corruption?
I tried following this thread.
When i did the “Attempt to Repair the Database” part, it gives me a message saying can’t open Database.
At this point i’m not too sure what my next step is…
I transferred this plex server from an old computer to this more recent one a few months ago, i had no other issues than the broken recommended tab for this specific library.
Please let me know what i should try next.
I’m nearly to the point where i’m going that route:
Verify that the database is corrupt. Pull the server log files. Look in Plex Media Server.log (and .1 to .5) for entries that mention SQLITE3 errors and database corruption.
Example: Oct 20, 2019 10:25:27.220 [0x7fdc47447700] ERROR - SQLITE3:(nil), 11, database corruption at line 64817 of [bf8c1b2b7a]
When attempting a repair, make sure you have first stopped Plex Media Server.
If the repair does not work, you may be able to restore from a backup. See Restore a Database Backed Up via ‘Scheduled Tasks’.
Before using the backup, check it to make sure it is not corrupt as well. After loading the backup, check the log files to verify the database is clean.
There is no need to uninstall Plex Media Server if repairing or replacing does not work. As mentioned in the repair article, you can just delete the existing database.
I don’t have a valid backup saddly, this happened a few months ago and just didn’t have time to deal with it right away.
I tried to delete the library again then checked that specific log file to find something along the lines of what you posted.
Here’s everything containing Error or Sqlite3 at that specific time.
Mar 10, 2022 11:08:35.776 [7748] DEBUG - Request: [127.0.0.1:62600 (Loopback)] DELETE /library/sections/6?async=1 (18 live) GZIP Signed-in Token (heliastein)
Mar 10, 2022 11:08:35.778 [7748] DEBUG - Activity: registered new activity 8035dc2d-6eec-489b-956f-f6270734f90e - “Deleting Library”
Mar 10, 2022 11:08:35.778 [5684] DEBUG - Activity: updated activity 8035dc2d-6eec-489b-956f-f6270734f90e - completed 0.0% - Deleting Library
Mar 10, 2022 11:08:35.778 [8036] DEBUG - Completed: [127.0.0.1:62600] 200 DELETE /library/sections/6?async=1 (18 live) GZIP 2ms 426 bytes (pipelined: 9)
Mar 10, 2022 11:08:35.821 [5684] ERROR - SQLITE3:0xa9ab4457, 14, os_win.c:47340: (87) winOpen(C:\Users\HELIAS~1\AppData\Local\Temp\2\etilqs_zhREaPkDwq9kpJE) - The parameter is incorrect.
Mar 10, 2022 11:08:35.821 [5684] ERROR - SQLITE3:0xa9ab4457, 14, cannot open file at line 47341 of [1b256d97b5]
Mar 10, 2022 11:08:35.821 [5684] ERROR - SQLITE3:0xa9ab4457, 14, statement aborts at 78: [delete from metadata_items where metadata_items.id in (select metadata_items.id from metadata_items where metadata_items.id in (select metadata_relations.related_metadata_item_id from
Mar 10, 2022 11:08:35.821 [5684] ERROR - Exception inside transaction (inside=1) (E:\jenkins\server\3584954646\Library\Scanner\LibrarySection.cpp:466): sqlite3_statement_backend::loadOne: unable to open database file
Mar 10, 2022 11:08:35.822 [5684] ERROR - Thread: Uncaught exception running async task which was spawned by thread 7748: sqlite3_statement_backend::loadOne: unable to open database file
Mar 10, 2022 11:08:35.822 [5684] DEBUG - Activity: Ended activity 8035dc2d-6eec-489b-956f-f6270734f90e.
Here’s the whole block.
I have been keeping this database for years now, there’s been lots of manual little changes done in different libraries.
I was hoping not to have to start fresh but it’s looking grim i guess …
Edit: I forgot to add that my server was off when i tried to do a repair.
Here’s the output:
C:\Users\heliastein\AppData\Local\Plex Media Server\Plug-in Support\Databases>“C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” com.plexapp.plugins.library.db “.output recover.out” “.recover”
SQL error: unable to open database file
C:\Users\heliastein\AppData\Local\Plex Media Server\Plug-in Support\Databases>
I searched the forum for the “cannot open file at line…” error.
Two posts I noticed that might apply:
Check the drive for available space. Make sure it is not completely full. The user later reported the drive was full, which was causing the problem.
Check the c:\ drive for errors. The problem occurred on a NAS which had file system errors. The user never followed up, so unsure what was done to finally fix things (obviously had to fix the file system errors, but do not know if any Plex specific steps were needed after that).
If you’ve another drive available, you might try copying the database to it and attempt the repair process. This would get around any file system issues on c:.