DB DBCompact: could not obtain exclusive DB access 0/45600 0/45600 0/0/0

mvoss

Pulling my weight
Oct 21, 2023
129
102
Texas
I get this error whenever I schedule or try to Compact the database. The only way I am able to get the database to compact is to shut down the service, restart the service, and run the compact immediately.

I have the schedule to only run once per week. Any ideas on how to fix this?

I have evern deleted and had BI regenerate the database but that did not fix it.

Thanks,

Michael
 
  • Like
Reactions: Flintstone61
What version please, not sure if it relevant or not?
Also have you excluded your BI folders from scanning by you Antivirus software
Can you do the rebuild manually from within BI, is the rebuild scheduled from within BI?
 
What version please, not sure if it relevant or not?
Also have you excluded your BI folders from scanning by you Antivirus software
Can you do the rebuild manually from within BI, is the rebuild scheduled from within BI?
Hi Bruce,

I'm on 6.104 but this has been happening with other versions also. I could be wrong ut I noticed it not long after I upgraded to 6.0

All my folders, inclusing thw BI process is excluded. I have defender turned off so it never runs.

The rebuild is scheduled w/in BI. I'll try a manual rebuild and see what happens.

Thank you for the reply.

Michael
 
Whenever I try a manual rebuild I get the same error. I stopped the service restarted it and was able to do a manual regenerate. I then tried doing it a few hours later and got the same error "DBRegenerate: could not obtain exclusive DB access 1/0/0"
 
From Google AI ( Gemini)
This error occurs when Blue Iris attempts its database maintenance or compaction process, but another service, background thread, or locked file handle is actively preventing it from obtaining exclusive control of the database files (db.dat).
Primary Causes
  • Active Background Operations: Re-indexing, clip moving, or deletion processes are currently running in the background.
  • Third-Party Locks: Antivirus software, cloud backup tools (e.g., OneDrive, Backblaze), or local indexing services are scanning or locking the database folder.
  • Corrupted or Orphaned DB Files: Bad file handles left over from an improper shutdown or crash.
  • Multiple Instances/Services: Blue Iris service and the desktop UI running concurrently under mismatched user permissions.
Resolving the Error
  1. Stop the Blue Iris Service & Process
    • Close the Blue Iris console app.
    • Press Win + R, type services.msc, and hit Enter.
    • Locate Blue Iris Service, right-click, and select Stop.
    • Open Task Manager (Ctrl + Shift + Esc) and ensure no lingering BlueIris.exe processes are running.
  2. Exclude the Database Folder from Scanners
    • Add the entire Blue Iris db directory (typically C:\BlueIris\db) to your antivirus / Windows Defender exclusion list.
    • Ensure any active cloud sync software (OneDrive, Dropbox, Google Drive) is set to ignore or stop monitoring the Blue Iris folder.
  3. Manually Regenerate the Database
    • Open File Explorer and navigate to your database folder (C:\BlueIris\db).
    • Delete or move all .dat files (such as db.dat, db.dat-wal, db.dat-shm). Note: This will not delete your video clips, only the index.
    • Start the Blue Iris service or application again.
    • Right-click the camera view, go to Database, and select Regenerate. Allow the process to complete without closing the application.
  4. Verify Folder Permissions
    • Right-click the db folder > Properties > Security tab.
    • Ensure the SYSTEM account and Administrators group have Full Control over the directory.
 
  • Like
Reactions: mvoss and Bruce_H