Database not rebuilding - Crashes and Freezes GUI, prevents service restart

MikeF74

n3wb
Joined
Jan 11, 2021
Messages
3
Reaction score
0
Location
USA
v5.3.7.13 x64 (1/8/2021) on Windows Server 2019, 10th gen i5.

When trying to figure out why I'm not seeing anything in my "NewMotion" listing in BI GUI, despite there being files present in that folder on the disk, I decided to do a repair/rebuild of the database. I've tried twice now. When I initiate it, the GUI crashes almost immediately (Windows Event Viewer shows 0xc0000409 (stack overflow)). When I re-launch the GUI, it says "Scanning RecentRaw 100" (where RecentRaw is the name of my AUX1 folder) and doesn't allow any interactivity in that left-hand listing. Attempting to close GUI causes the GUI to freeze and I must kill the process. It's not until I restart the service that I can do anything on the left-hand side again (in fact, the service won't restart, it releases a lot of memory but I must kill the process). I've tried this twice now. Each time, waiting well over an hour just to make sure the rebuild has had enough time to do its thing.

I can't imagine my renaming/repurposing of original folders has any effect, but let me just lay out my folder structure just in case:
  • NewRaw (originally "New") - 190GB, overflows to RecentRaw (currently 189GB)
  • NewMotion (originally "Stored") - 190GB, overflows to RecentMotion (currently 250MB)
  • Alerts (unaltered)
  • RecentRaw (originally "AUX1") - 150GB, overflows to ArchiveRaw (currently 149GB)
  • RecentMotion (originally "AUX2") - 150GB, overflows to ArchiveMotion (currently empty)
  • ArchiveRaw (originally "AUX3") - 5TB, delete afterwards (currently 4.5TB)
  • ArchiveMotion (originally "AUX4") - 5TB, delete afterwards (currently empty)
All three volumes involved are formatted with ReFS instead of NTFS (it shouldn't make a difference, but thought I'd mention it).

Once I restart everything, my database is as it was previously... everything is up to date as far as I can tell, but still nothing listed for my NewMotion folder that has stuff in it on disk.

Any suggestions on how to rebuild my database and get my NewMotion items to appear?
 

MikeF74

n3wb
Joined
Jan 11, 2021
Messages
3
Reaction score
0
Location
USA
Update, I noticed that my ArchiveRaw folder had 1055 files in it, but the listing only showed 904. I deleted about 165 files (the 151 difference, plus a handful more). My database now regenerates without crashing or freezing or preventing service shutdown.

I still don't see anything in NewMotion, but I suppose that's a different problem.
 

MikeF74

n3wb
Joined
Jan 11, 2021
Messages
3
Reaction score
0
Location
USA
Update 2:

The reason I wasn't seeing anything under "NewMotion" was that this was a cloned and hidden camera used for creating motion clips. Once I clicked on "Show clips from excluded cameras", they showed up. I had not tried toggling this setting before because I didn't have any "excluded" cameras, I had "hidden" cameras. Words matter, those should both use the same word.

Regarding my previous post, is there some known issue with the number of files in a folder when it comes to database rebuilds? Is this something I'm likely to run into again? I have my continuous recordings broken into one hour blocks, which obviously increases the file counts.
 

SouthernYankee

IPCT Contributor
Joined
Feb 15, 2018
Messages
5,170
Reaction score
5,320
Location
Houston Tx
The database is corrupt. Delete all files in the Db folder. Reboot. You will not lose any video files. You will lose all alert pointers.
 
Last edited:

SouthernYankee

IPCT Contributor
Joined
Feb 15, 2018
Messages
5,170
Reaction score
5,320
Location
Houston Tx
My Standard allocation post.

1) Do not use time (limit clip age)to determine when BI video files are moved or deleted, only use space. Using time wastes disk space.
2) If New and stored are on the same disk drive do not used stored, set the stored size to zero, set the new folder to delete, not move. All it does is waste CPU time and increase the number of disk writes. You can leave the stored folder on the drive just do not use it.
3) Never allocate over 90% of the total disk drive to BI.
4) if using continuous recording on the BI camera settings, record tab, set the combine and cut video to 1 hour or 3 GB. Really big files are difficult to transfer and read.
5) it is recommend to NOT store video on an SSD, multiple constant writes will kill an SSD.
6) Do not run the disk defragmenter on the video storage disk drives.
7) Do not run virus scanners on BI folders
8) an alternate way to allocate space on multiple drives is to assign different cameras to different drives, so there is no file movement between new and stored.
9) Never use an External USB drive for the NEW folder. Never use a network drive for the NEW folder. The New folder must be on an internal drive.


Advanced storage:
If you are using a complete disk for large video file storage (BVR) continuous recording, I recommend formatting the disk, with a windows cluster size of 1024K (1 Megabyte). This is a increase from the 4K default. This will reduce the physical number of disk write, decrease the disk fragmentation, speed up access.

Hint:
On the Blue iris status (lighting bolt graph) clip storage tab, if there is any red on the bars you have a allocation problem. If there is no Green, you have no free space, this is bad.
======================================
 
Top