Hub process slowdown after several days

@bravenel

So what are your thoughts on the DB getting corrupted or something similar going on in my case? I just find it odd my hub was performing great until we had several power outages in a day.

I know I need to invest in a UPS have for sometime to not only protect my hub but the rest of my equipment.

Also I'm sure some of my comments come off as attacking Hubitat just as yours comes off as being defensive. I'm in no way trying to put down the team or the community as I'm sure your not trying to come off as defensive.

We all know peoples perception is there reality!

I certainly don't have any idea about your case! It is possible for DB corruption to happen when power is abruptly pulled from the hub. Our reboot process usually discovers this, and reverts to a DB backup if needed. It's a good idea to download a backup of your DB periodically. As far as I know, restoring a backup of a good DB restores the hub to the way it was functioning when that backup was made.

Did you contact support?

I have never done this myself but have seen posts from many that say a soft reset fixes database corruption issues. The community can chime in on this:

https://docs.hubitat.com/index.php?title=Soft_Reset

1 Like

I did and they made changes to my nic which required a reboot and of course things ran better for a few days. I then came across the 1% who setup a reboot rule and have been using that for a few weeks now. I still notice some slow processing of my automation's on occasion but not really had time to dig into it when I see it. Being Friday and now that I'm taking Monday off I hope to dig into it a little more this weekend.

@stephack Thank you I will look into this in more detail.

Yes, I have had issues including slowness where a soft reset has resolve them in the past. In fact I measure the response time of the hub with NodeRed and noticed the time go from around 2 seconds down to 500ms after the reset.

My response time seems to sit around 400-500ms, which I consider good.

I have seen the exact same thing, using the exact same tools. I have three hubs, and twice now my development hub has experienced ~2sec response times as measured by the same Node-Red flow. Backing up the database, and then performing a soft-reset, and then immediately restoring the backup has resulted in performance being restored to the ~0.5sec 'normal range'.

See... To me that isn't a "user code" issue. That sounds more like a database issue, which is a core system function...

1 Like

I believe the DB backup does an 'export' and then you download that. What that means, if true, is that a restore, creates an empty DB and then creates the schema and adds individual records, leaving anything corrupted behind.

SoftReset deletes the DB before rebooting and during reboot, an empty DB is created. A restore, as I mention above, refills the DB, record at a time, resulting in a clean DB.

I've chosen to do it quite a few times in the past month or so. I really beat up my Development hub while coding, and when it's time to do testing, I want to get to a hub that is factory fresh. (SoftReset does not disconnect any ZWave or Zigbee devices.) It's an impressive process that's well worth learning and getting confidence in before you need it.

4 Likes

I suspect that the DB is easily prone to corruption from power loss and that symptoms may not show up right away or get worse as the data is added.

I really like that hubitat allows us to install user-developed code, with the disclaimer that any negative impact to the hub is an issue for the user and app/driver developer to sort out.

I think comparing that stance to Apple and it’s App Store is actually not valid. A more accurate comparison, IMO, would be how Apple might respond if you asked them for help after jail breaking your iPhone and encountering trouble with an app you downloaded through Cydia.

I think Hubitat staff have made a reasonable compromise between “no custom code” and an official app store with thoroughly vetted code only, licensing agreements with community developers, etc.

Does anyone actually know how many hubitat users rely on some amount of custom code? Not referring to @bravenel or other hubitat staff, I mean; I don’t seriously expect them to reveal a trade secret just to prove a point with their online user community.

But isn’t it possible we are making much ado about nothing, if those of us who use custom code are just a fraction of the total user base?

3 Likes

Perhaps that should be our advice when someone mentions they pulled power, accidentally or on purpose?

Should we be advising a DB save and restore? I know, from experience, that a Save-a-Backup followed by a Restore does not "feel as clean" as the Save-a-Backup SoftReset Restore. The difference may only be 60 seconds of additional waiting.

Anything's possible, of course.

The opinions and requests above are no less valid, though.

That's fine if there aren't enough users affected to warrant the effort to improve those areas of the hub... But that's a different answer than they have been giving.

Of course, Hubitat has explicitly said they collect NO telemetry data, so they have no way to know that it is a 'small %' of users either, do they? Unless they are inferring that from the forum posts, which isn't a good metric either - but it may be the best that they have.

1 Like

Hello? Do you know about support@hubitat.com?

But those clamoring for more staff and/or platform resources dedicated to the use of custom code seem to be taking it for granted that it’s worth the time and effort required.

I don’t see how it would benefit them to go into specific numbers publicly, but this isn’t the first time I’ve read @bravenel write this:

So again, while I really appreciate what custom code does for me in my applications at home, I don’t assume that what I or the most vocal online power users want to do with it should dictate the direction of the platform at large.

Indeed I do. And I'm sure you also know of the multiple studies out there that show many (in some cases most) users give up and return devices or move on and don't ever engage support.

Anyway, I'll quit arguing/playing devil's advocate. I believe you guys when you say you're doing what you can. I don't have anything new to add to the discussion at this point.

If Hubitat are not going to support* user made apps/devices, then they should probably remove it from their advertising, or at least put a proviso. This has been an ongoing issue for some time on the threads.

*support probably isnt the right word.

I love Hubitat, and responsive staff. I have two hubs. I dont run any custom apps on my main C5 hub as detailed here, except Device Watchdog, Average All and Supertile, and of course, HubConnect. I've removed all my problematic LAN apps to my second C4 Hub, which never has slow downs.

I've resorted to rebooting my main C5 hub nightly, and it's working well. I'm currently loving how everything is snappy - all the time.

1 Like

I'm still interested in what you think the right approach is?

On the one hand, we could remove the ability to create custom apps and drivers except for those who apply for a "developer" status. In that approach, we would vet every app and driver proposed to be shared, and only allow ones that work well to be made available to other users. We would be the custom app/driver regulators and approvers. This would be a walled garden approach, with us as gatekeepers.

On the other hand is the approach we have taken. We allow anyone to write apps and drivers, and anyone to install them. In this model, we take a hands-off approach. We don't approve or disapprove, and by definition we don't "support" those apps and drivers. This is a free and open exchange of software between users, with attendant risks to users. If it's free and open, then there are risks associated with using software you didn't write and that we didn't write.

Is there some vision where we have a free and open exchange but we are held responsible for that which is shared?

3 Likes

If anything is done, maybe we have a list of approved apps and drivers, and a switch to turn on developer mode if people want to install anything.... ?

I rather see your staffs time focused on other features then using your companies resources on such things....

3 Likes

I do not see Microsoft, Apple or Samsung supporting third party apps so I am not sure why its expected of the HE staff to support all third party apps?

2 Likes