ERROR: Database Locked while scanning TV Shows

Server Version#: 4.147.1
Player Version#:

Every time I scan TV shows, it will add half a season before Plex hangs and throws this error:

“Failed to begin transaction (D:\gha\plex-media-server\plex-media-server\Library\LibraryShareManager.cpp:136) (tries=10): Cannot begin transaction. database is locked”

This folder does not exist and I do not have any of my Plex stuff on “D:” and the only way around it is to force stop Plex and relaunch. This has persisted through two updates and it is driving me crazy. I followed the Repair Database Article and the diagnostics came back “OK,” so now I am at a loss. I have over 500 complete shows ~3400 movies that I really don’t want to have to rebuild collections from scratch (again).

Any help would be greatly appreciated, thanks y’all.

Server Version #: 1.41.9.9961
Player Version #: 4.147.1

I have backups of my current DB, 2 Jun 25, and 30 Mar 25.

Okay, after some time, I found the solution.

DBRepair would hang and do nothing after several hours. Someone else posted on Reddit about the exact same problem and another use brought up "this thread about database bloat. I made the batch file and it ran for about an hour. It shrank my DB from 85gb to 700mb and DBRepair was able to do its thing without issue. Everything is working great again!

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