Corrupt database found - any advise?

What seemed to be working last night for a couple people that had this issue was re-attempting the soft reset. (Reboot was getting stuck at around 15% or so...)

2 Likes

Yeah, now that you mention it, I did see @aaiyar suggesting this earlier... to @azz710

1 Like

Yes reboot is successful! And it looks like all my devices, apps, and automations are back to where they were before.

Just a simple question: If my database is curropted and I take a backup afterward and then restore that backup after a soft reset aren't I loading back a curropted backup?

1 Like

I think it is ok... but HE staff can answer that with more authority than me...

Glad to hear you are back up and running :slight_smile:

oh okay. Hopefully the support team can chime in on that.

Thanks to you and @thebearmay for the fast responses! I was starting to have a heart attack this morning.

2 Likes

Have seen a thread from last month where HE staff were suggesting to keep an eye on the logs following the soft reset to make sure nothing re-occurs that may have caused your issue. Probably a good idea to keep an eye out for anything strange.

Backing up and restoring the data base removes the corruption. I have had bad backups though and had to load a prior backup. A good reason to keep multiple backups on another device.

1 Like

Good suggestion, I download 14 days worth to a raspberry pi. From memory there is a reasonable number kept in cloud for you as well...

It depends on what exactly got corrupted. Generally, I'd go with a previous backup.

How do I know what's been corrupted?

It contains all apps (including automations and app code), devices and device drivers. It doesn’t include files that are added through the file manager. Only the cloud backup include the z-wave database, but restoring the file backup leaves what’s there alone, so this doesn’t cause any issues.

I have done many soft resets and many restores on my main hub and have not had any issues (yet…). It’s scary the first time, not so much the 5th…. :wink:

2 Likes

Seems like so long ago now but I was doing soft resets 2-4 times a day when I needed to test different HubConnect configurations. Soft reset to a backup that has no HubConnect and install it, through soft reset to a config that had the most recent version and do the upgrade.

I haven't needed to do one very often but the practice of doing it 4 times in one day sure improves confidence. :slight_smile:

1 Like

After doing a soft reset I'm starting to see this alert again:

I assumed it was related to the ghost node that I can't find a way to delete. How do I confirm the root cause of this alert?

The only time I had a DB size issue I was also fighting a ghost node. May not have been related, but it sure felt like it. That being said, what are your events and states set to, and how do the device run time stats compare to that setting?

So events and states were set to 100 which I think is the default. I changed to 11 after reading this:

There are certainly a large db log:

Hopefully this stabalizes after going from 100->11 for event/state history

Things like weather, TVs, Roku, and things like that have lots of events, and they seem to create (falsely or not?) that database warning. Not picking on any particular app or device or driver here, but those are often very intensive things with lots of events in general and it can't be helped that they need lots of storage.

But storing needless events seems to make things sluggish and the hub run worse. Setting to 11, or even less for some apps, seems to really calm things down. In particular, I set weather to 1. Why do I need to keep days upon days of past weather events? Or TV stuff, isn't one or two of each event enough?

Before they gave us the ability to manage events in one of the last couple updates, I had hundreds upon hundreds of motion sensors events stored from a year previous! That was ridiculous to say the least. Wasted space at best. Thank goodness we can limit things now.

2 Likes

About 24 hours ago I changed both event and states to 11:

image

Yet my database keeps growing from yesterday:
image

I can only think it's related to that ghost node but I have no way to prove it.

When a database is growing out of control like this, it is probably an issue with the platform software. I believe @gopher.ny has identified an issue where the database engine fails to reuse space, thus causing it to grow out of control, and is working on a potential fix for an upcoming release. You should be able to simply backup your hub, and then restore it to resolve the issue. Or you can perform a soft reset on the hub.

1 Like

It seems like that would only be a temporary fix that would buy me a few days because same thing happened 3 days ago:

and I did perform a soft reset:

1 Like

Okay, then you may want to reach out to support@hubitat.com to see if @bobbyD and @gopher.ny can take a look at your hub.

2 Likes