Alert - Your database is growing

http://hubip/hub/advanced/databaseSize

1 Like

Thanks! So you basically have virtual sensor where data is stored and it is read with certain intervals from that url to virtual sensor?

1 Like

Try this

2 Likes

The hub info driver along with hubigraphs! I made up the green/yellow/red band limits.

6CCAC8B4-6291-402F-9AA1-C7B69EBD111C_4_5005_c

4 Likes

How do you get your database sizes into influx/grafana! I would really like to do the same as I use grafana a lot.

Thanks

sorry just seen the answer!

That's a good idea... based on feedback, I'll probably raise the alert threshold for the hub to 70-80 range and tag anything between that and ~150 as elevated/yellow range. Anything above 150 deserves a "code red". I'm sure there are exception to the rule, but those are just that - exceptions.

1 Like

Thanks, adjusted. I compromised on green 75 and 150 for the yellow/red cutoffs. Plus it makes for a more orderly looking gauge. I haven't added any alerts yet since the hub itself alerts me at around 50.

827F2594-93BC-41D4-A4B9-40F526113F79_4_5005_c

The same after setting

/hub/advanced/event/limit/11
/hub/advanced/deviceStateHistorySize/11

Before: 2132m
After: -2144m

hubdb

I did not see any performance issues before/after clearing db

It's still growing for no good reason, which means it's best to take a local backup and do a soft reset.
I'll adjust the alert to provide clear soft reset instructions and some form of a shortcut so that users don't have to fuss with the diagnostics tool.

3 Likes

My db size has been stable since I did the soft reset. I guess my question is do we know what causes the runaway db? Is it an artifact from one of the upgrades?

I don’t think that causes a database cleanup. I believe it will trim that down with the nighttime maintenance.

Today I received a High CPU Usage Alert. I did not have normal access to the hub.
I received DB corrupted message after restarting.

Next, I made a soft reset and the hub restoration from the backups.
Looks like the system back to normal after restoration from the backup.

But DB size still increasing quickly - 1mb in 10 min

  • dbSize : 3
  • firmwareVersionString : 2.2.7.126
  • formattedUptime : 0 days, 0 hrs, 21 min, 53 sec

Database is in compact state when restored from a backup and will grow quickly right immediately after. That only becomes an issue if it keeps growing after several hours of uptime (usually in a linear manner).

There are some relevant tweaks in upcoming 2.2.8. We'll see how effective they are once it's out...

4 Likes

After performing Soft Reset and Backup restore that I made following a similar accident some weeks ago**, now everything is OK with my C7 hub**.

The 7-days graph seems like this:

Database size starts from 17MB after a hub Reboot, grows quickly, but then stabilizes and cycles between 80MB and 110MB :

Both events and history sizes are set to 11 for almost all of my devices.
Everything works fine in the last 2 weeks.

2 Likes

I have been noticing database is growing alert. It is not letting me post a screenshot but I am currently at 599m and growing.

Is the recommendation still to change everything from 100 to 11? I had tried restarting my hub yesterday, but the number just climbed up again. I appreciate any help because I’m a little lost here.

Is your database still at 559+? If so, you may want to take and download a current backup, immedately do a soft reset (this will erase the DB on the hub), and then restore the DB when the hub comes back up from the reset (link near the bottom of the page.) This seems to strip out any bad records from the database and generally makes it stable again.

1 Like

Can't hurt. If alert on the home page is still up, clicking it will bring a separate alerts page, which includes a form to set the settings for all devices at once.

I second that.

3 Likes

Is it necessary to do both or would changing the values to 11 be enough?

Changing the values will have very little, if any, impact on a rapidly growing database; it is generally the remedy for database creep (3-4MB not 400-500MB). Your best bet is to do both.

1 Like