Very slow DB regenerate

lergolas

n3wb
Nov 2, 2022
2
0
Valladolid - SPAIN
Good morning.

I'm having a problem with a camera server running Blue Iris version 5.9.9.64, the latest version released. I updated it to this version today to see if it fixed the problem, but it didn't.

Last Friday, there was a power outage and the server suddenly shut down.
As has happened to me before, the database became corrupted and I had to rebuild it.

The problem is that the rebuild took almost two days, when it normally takes an hour or less from scratch.
Also, I was still having the Drives Overallocated issue, so it wasn't done correctly.

The rebuild is done from scratch, stopping the service, renaming the db folder, and starting it.

The server has 44 cameras, and the version I had at the time of the outage was 5.9.9.54, which I updated on 02/06/25.

I did the first rebuild on that version, and since it was slow, I updated it to the latest one.

On June 2, 2025, when I updated to version 5.9.9.54, I performed an identical rebuild from scratch, and it performed successfully.

More information: I have two types of disks: an SSD for the database and new recordings, and an HDD for storing older recordings.
I've tried removing the older recordings because they're on slower disks and rebuilding only with the ones on the SSD, but I have the same problem.

Obviously, I've checked the disks, both the SSD and the HDD, and they're fine, with normal reads and writes.

I don't know if you can think of anything I can do or what might be happening.

Thank you very much.

Best regards.
 
Just a suggestion, you might want to consider getting a UPS so that power outages don't crash the BI server!

As for your drives overallocated, some screen captures of the setting for you storage drives might help to see if there is something that can be suggested!
 
I am having the same problem and my machines are on an UPS.

I tired deleting all recordings and than I only had a hour or so recordings on some cameras and none on others, than it got worse and than I had several fatal errors while in blueiris.
 
Thank you very much for your reply.

We have a UPS system, but it failed the other day when it was supposed to be working. There are usually power outages in the area, and it doesn't shut down; it was just bad luck.

I've attached a screenshot of the disk notification once the rebuild of the SSD recordings was complete. In theory, it completed the rebuild correctly.
dbstart.JPG
dbfinish.JPG

It's supposed to have recorded all the recordings on the SSDs in the database (the top drive), but it still doesn't recognize the disk space occupied by them...
disk.JPG

Blue Iris config New folder:
new.JPG

I don't know what could be happening,
 
I was having this issue and couldn't get a complete DB Regenerate after numerous attempts.
BI was very slow especially when processing STORED which is on NAS, and would crash after a while before regenerate completed.

What seems to have worked is to delete all the .dat files from the STORED folder, leaving only the .bvr files.
I suspect this might result in some alerts not being present, especially if rebuilding from scratch.
My alerts were showing way over the quota anyway.

Hope this helps.
 
  • Like
Reactions: Flintstone61
If the drive free space is lower than about 5-10%, the read/write function may not work as fast, since the processor uses Virtual memory on drive free space to "hold" data temporarily.
 
Last edited:
If Blue Iris " thinks" or is being told, "free space" is occupied by data, then it can't over write it with Virtual memory function that the processor uses to swap data around.
 
Also some SSD's may report status OK in a check, But if the drive controller is beginning to fail it may not be able to report that.
"NEW" is normally written to a Surveillance disk of Terabyte size. Because they tolerate more overwrites than SSD's.
If I was streaming 44 cameras I'd be splitting the streams across 2 or 3 separate Terabyte drives to keep the computer running fast.
Right now I'm splitting 12 cameras onto 2 Western Digital 8 TB drives so I can keep 3-4 weeks of security video in case i need to go back and see a behavior pattern of suspicious vehicles/persons/ animals.
 
Drive X:\ folders functioning as "new" folders are "New, Aux1, Aux2, Aux3.
and on drive D:\ Aux4 functions as another folder receiving " new" recordings.
Windows and Blue Iris and Alerts are on an SSD.
1756101211750.png