Plex is not deleting one of my libraries

Server Version#: 1.17.0.1841
Player Version#: 3.108.2

I am trying to delete a library folder from my Plex Media Server through the Web UI. However, everytime it completes, it is still there.

When I click the library I can’t delete, it says “There was an unexpected error loading this library”. I have a feeling that there might be some corruption going on. Here are the logs on what happens when I delete the folder:

Oct 05, 2019 16:10:48.191 [0x9f0f6450] DEBUG - Request: [192.168.X.X:X (Subnet)] DELETE /library/sections/24?async=1 (10 live) TLS GZIP Signed-in Token (X@X.X)
Oct 05, 2019 16:10:48.193 [0x9f0f6450] DEBUG - Activity: registered new activity 4x783964-2x58-455x-xx9x-370x7xxx6x0x - Deleting Library
Oct 05, 2019 16:10:48.194 [0xab0fe450] DEBUG - Activity: updated activity 4x783964-2x58-455x-xx9x-370x7xxx6x0x - completed 0.000000% - Deleting Library
Oct 05, 2019 16:10:48.195 [0xb0eff450] DEBUG - Completed: [192.168.X.X:X] 200 DELETE /library/sections/24?async=1 (10 live) TLS GZIP 4ms 377 bytes (pipelined: 4)
Oct 05, 2019 16:10:48.380 [0xab0fe450] WARN - Held transaction for too long (../Library/Scanner/LibrarySection.cpp:361): 0.200000 seconds
Oct 05, 2019 16:10:48.381 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 11, database corruption at line 65066 of [bf8c1b2b7a]
Oct 05, 2019 16:10:48.382 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 11, statement aborts at 3: [REPLACE INTO 'main'.'fts4_metadata_titles_segdir' VALUES(?,?,?,?,?,?)] database disk image is malformed
Oct 05, 2019 16:10:48.384 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=1): Cannot commit transaction. database disk image is malformed
Oct 05, 2019 16:10:49.018 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:49.018 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=2): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:49.287 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:49.287 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=3): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:49.824 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:49.825 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=4): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:50.900 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:50.901 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=5): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:52.052 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:52.052 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=6): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:52.354 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:52.355 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=7): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:52.960 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:52.960 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=8): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:54.171 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:54.171 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=9): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:54.592 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [COMMIT] cannot commit - no transaction is active
Oct 05, 2019 16:10:54.593 [0xab0fe450] ERROR - Failed to commit transaction (../Library/Scanner/LibrarySection.cpp:361) (tries=10): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:54.593 [0xab0fe450] ERROR - Exception inside transaction (inside=1) (../Library/Scanner/LibrarySection.cpp:361): Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:10:54.593 [0xab0fe450] ERROR - SQLITE3:0xbedf8628, 1, statement aborts at 1: [ROLLBACK] cannot rollback - no transaction is active
Oct 05, 2019 16:10:54.593 [0xab0fe450] ERROR - Failed to roll back transaction (../Library/Scanner/LibrarySection.cpp:287): Cannot rollback transaction. cannot rollback - no transaction is active
Oct 05, 2019 16:10:54.593 [0xab0fe450] ERROR - Thread: Uncaught exception running async task which was spawned by thread 0x9f0f6450: Cannot commit transaction. cannot commit - no transaction is active
Oct 05, 2019 16:11:04.153 [0xab0fe450] DEBUG - Activity: Ended activity 4x783964-2x58-455x-xx9x-370x7xxx6x0x.

Database is broken

https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

Thanks. It seems to have worked, I just deleted that folder.

Is there any way to avoid it in the future?

Most times it happens due to one of the following:

  • Power failure => Get an UPS
  • Some 3.Party tool access the database directly => Don’t use that 3.Party
  • AntiVira solution scanning location, where the database resides => Exclude path

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