Troubleshooting ideas for DBCompact error?

kriskross

n3wb
Joined
Aug 8, 2017
Messages
20
Reaction score
10
Location
California
***Note: this has been solved, see my entry further down in this thread.

I have been getting a recurring DBCompact error in my alert emails for months now. Everything seems to be working fine with Blue Iris otherwise. I'd welcome any troubleshooting ideas to help me narrow this down, because I'm fairly computer-proficient but not with newer PCs (it's been 12 years since I had a PC and I don't know all the troubleshooting tools). Some details:


- it goes away for 4-7 days after I restart the computer; then I start getting the error every night until I reboot again, at which point it stops again for a few more days.

- I run Blue Iris as a service and usually access Blue Iris via iPhone/iPad (app). I access the PC directly via Teamviewer (over my local wifi network). If during the period I am not getting the error, I access the computer and open Blue Iris, the error begins occurring that night (it takes a few more days if I don’t access the computer directly).
- this error has been occurring across multiple version of Blue Iris, since at least last November (I’m don’t remember exactly when it started).
- I've tried changing the time for the Compact/repair to various times (most recently to 4:15am) to see if it was conflicting with something else, but that didn’t help.
- Windows Defender is set to exclude the Blue Iris database files and archives, as well as the Blueiris.exe file from scanning (I am not using any other antivirus program right now)
- I do not see anything in the system logs that is happening at that time of day
- the Clips.dat file has Write/Modify permissions for all users

------------
Here is the error format (in context with my alert email contents):

Clips: 2759 files, 7.22T/7.22T; D: +50.9G, C: +81.4G

2/15/2018 7:13:00 AM Cam1: MOTION (0)
2/15/2018 7:12:39 AM
New: Delete: nothing to do [1951/168 hrs, 7.22T/7.22T, 51.8G free] (2523)
2/15/2018 5:56:00 AM
App: Current profile: Home-Day (0)
2/15/2018 4:15:33 AM
Clips: DBCompact could not obtain exclusive DB access 1/0/0/0 (0)
2/15/2018 2:05:38 AM
Cam6: Signal: restored (3)
2/15/2018
App: Today's sunrise: 6:40 AM, sunset: 5:35 PM (0)

**most recently I restarted the computer on 2/6 at 12:25 pm, and started getting the DBCompact error on 2/9/2018
----------------
system info:
Version: Release 4.6.6.1 x64
OS: Windows 10 Pro
CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz [42%]
RAM: 1.09G
Clips: 2749 files, 7.22T/7.22T
Storage: D: +50.9G, C: +82.4G

And, a couple screenshots of my Startup, and Clips and Archiving settings:Screen Shot 2018-02-01 at 12.10.30 PM.png
Screen Shot 2018-02-01 at 12.13.01 PM.png
 
Last edited:

kriskross

n3wb
Joined
Aug 8, 2017
Messages
20
Reaction score
10
Location
California
I forgot to mention that I can manually compact the database without error. I've just changed the compact time to happen when I'll actually be awake tonight so I can log in to the PC and see if there's anything obvious going on.
 

kriskross

n3wb
Joined
Aug 8, 2017
Messages
20
Reaction score
10
Location
California
An update:
Since I can't manually reproduce this problem, I have to wait for the automatic database compaction to execute to try things out. Over the past two days I've discovered:
1. Having Blue Iris open and watching it during the compaction will still generate a "DBCompact could not obtain exclusive DB access 1/0/0/0 (0)" error.
2. Setting the Traffic signal to red before the process executes doesn't prevent the error.

The Clips list shows the "Compacting" message and refreshes itself, so it certainly looks like it's executing properly. I checked the Resource Monitor for processes with Disk Activity, but not much happening (System, OneDrive, explorer). I didn't think to have it up during the actual compaction (doh!) but opened it just after--MsMpEng (Defender) is there, however I've excluded the database files and blueiris.exe so it shouldn't be interfering. The Clips database is on the C drive, and the New folder is on a separate internal hard drive. I checked the Defrag process, and it hasn’t run for 97 days on the C drive.
 
Last edited:

gwminor48

Known around here
Joined
Jul 16, 2015
Messages
3,655
Reaction score
7,030
Location
Texas
I've noticed I'm getting this error lately too. Are you still getting the error?
 

kriskross

n3wb
Joined
Aug 8, 2017
Messages
20
Reaction score
10
Location
California
Last week, I finally upgraded BI to 4.6.9.5, and also updated our iOS apps, and now haven’t had the error for just over a week. I still need to try a couple of things to see if I can trigger it, but it’s looking good.

I’ve been communicating with the developer, and he thinks there may be something in the web interface that could potentially leave a thread open to the database (and interfere with the Compact operation), but I use mostly the iOS apps. I don’t have a monitor on the BI PC, so I log in to the PC over Teamviewer when I need to make configuration changes. It seemed like the Teamviewer login would kick off the recurring DBCompact error until I rebooted, but I haven’t been able to positively confirm this.

One suggestion he had was to try setting the traffic light to red during the scheduled Compact to see if that made a difference (beacuase it pauses the Blue Iris components that might interfere), but I still got the error. If you have a specific set of circumstances that trigger the error, or use the web interface, you might let the developer know for his troubleshooting.
 

gwminor48

Known around here
Joined
Jul 16, 2015
Messages
3,655
Reaction score
7,030
Location
Texas
Thanks for your reply and information. I'm running 4.6.9.4 so I may try upgrading if 4.6.9.5 is working well for people (sometimes I go for months without upgrading).
 

kriskross

n3wb
Joined
Aug 8, 2017
Messages
20
Reaction score
10
Location
California
Well, I spoke too soon. I just got the error again at the two-week mark. I updated the BI software on 2/27 and rebooted the computer, and haven’t accessed it since, other than to log in with Teamviewer to check my cameras after the daylight savings time switch. I haven’t opened the BI GUI on the PC since the reboot. The first DBCompact error occurred 3/14 and repeated last night. According to pattern, it should repeat every night now until I reboot the PC, then stop for a while. I’m out of town right now, so I’m not going to mess with too much at this point until I get home.
 

kriskross

n3wb
Joined
Aug 8, 2017
Messages
20
Reaction score
10
Location
California
Just wanted to update this topic in case anyone else runs into the problem. After I worked on this problem with the developer, he modified the code to release the database a little earlier before doing the Compact operation (starting with Blue Iris version 4.7.2) , and I've now been running for a month without errors. One symptom I did find which might help someone determine if you have the same problem: In the Resource Monitor, CPU tab, search for "blue" in the Associated Handles section at the bottom of the screen. If you see multiple entries for BlueIris.exe attached to your Clips file (clips.dat), it's the interference from those unreleased handles that gives you the DBCompact error.
 
Top