Database growing?

I have an alert on my hub today that says

Your database is at 2819m and growing. Try rebooting the hub first. If that makes no difference, perform a soft reset as soon as possible.

How can I see what is causing my database to be large? It doesn't seem to be state size in the device/app stats runtime statistics. Nothing there seems very large to me.

If you've eliminated # of events and states, then generally rapid growth is a sign of some type of database corruption (sounds like there are a couple issues that 2.2.9.x will address). Following the reboot/soft reset protocol normally resolves.

That's all for the C7 though. I'm on a C5.

I don't recall seeing that the fixes were limited to the C-7, but I'll admit the memory isn't what it used to be. Regardless, your remedy is still to reboot...

Same here "Your database is at 3371m and growing"....
Events and states seem low enough, actually adjusted everything back to 11 and 11 for Event and state size....still happening

I rebooted. Message is the same. What does a soft reset do?

A soft reset erases the database (devices aren't affected). So best course of action is to create a backup and download it, and then do the soft reset. When the hub comes back up, there will be a button or link near the bottom of the screen that says something about restoring a backup, click that and tell it to use the backup you just created. (Downloading the backup tends to strip out any problem rows.)

1 Like

I've been seeing this more often the past couple of weeks. I haven't really paid attention to the firmware versions, makes me wonder if it's a firmware/device combo that triggers this.

Something definitely going on, it's a new issue to me. I just posted over in another thread, seems to be a lot of people experiencing this

The nice thing is if you do not catch it growing then you wake up in the morning to a welcome screen on HE. Quick restore without your coffee and then you go make coffee.

1 Like

LOL, thats true!

Well, I guess I should not have just ignored the warning.

I did the soft reset. I see a bunch of runtime exceptions in the logs for automations that tried to run overnight before the hub eventually crashed. All variations of the following error:

java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.

I only did the restore like 10 minutes ago and everything seems fine, but I don't really have time to test it before I leave for work.

EDIT: Looking in backup and restore and it looks like my database barely shrunk in size.

What size is it? May want to reboot and see if it shrinks it; if not try downloading a copy and doing the restore from it; and if all that doesn't work try doing a soft reset with a restore from the downloaded copy.

Hey Folks,

Mine is a steady @ 13m now, far cry from 3371m! I suspect I wasn't far from a crash like what @waterboysh had on his HE. So, I want to setup a notification, but the notification app doesn't do attributes. Would I use RM for this? What do you think would be a good value? 100m?

100m is well within the "safe" range I would guess. Think mine averaged around 120-140 under one of the releases, but now stays around 40-50 on my main hub and 10-15 on dev hub.

1 Like

How do you see the size of your database? I just realized that the screenshot I posted was the size of the backup file, which is everything BUT the database.

Seems I may written a small driver (Hub Information Driver) :sunglasses: to get routine access to that and a few other pieces of data, but you can also check the DB manually using a call to

http://yourHubIP/hub/advanced/databaseSize

2 Likes

The backup file basically is the database, though I don't believe the backup file size necessarily corresponds to the size you'd see in the UI (not sure about the endpoint mentioned above that the Hub Information Driver would also read; guessing that might be closer than me looking at my recent backup sizes or making a new one after seeing that warning in the UI, which I haven't seen lately...).

On my devHub, backup is running in the ~0.6 - 0.75m range with the database reporting 13-15m....
Main hub is a constant 3.4m with a database reporting in at 40-50m

So it's a variable compression rate (as expected with LZF compression)

1 Like

That's what I use is the

You can pull all kinds of data from that including your DB size. It's pretty cool. Thanks @thebearmay . Now I just gotta figure out the rule for a notification.

1 Like