Hub Low on Memory Alert, Have Questions

Just built this simple rule, if memory <120mb for over 2hr, reboot at a specified time and notify me. I chose reboot time that wont interfere with any of my automations. Not tested yet.

Uses 'Hub Information driver' to get the freeMemory value for trigger. Again, I think this freeMemory should be a built in hub accessible value.

Very much apprecaited, @moh
My stalling point is the "hub information driver" Forgive me as i dont understand where or what this "driver" is. is this an app i need to install first? an idiots guide of how to get this bit established would be appreciated to help me (the idiot) out. thanks

Here is the info. It's real easy to find stuff here with a quick search. Click on the search magnifying glass and enter "hub information driver" and the first hit is: [RELEASE] Hub Information Driver v3

Just the job! much appreciated, thanks

Hi @kampto ,

Your rule appears to be a more elegant method compared to my Rule #1. Good job! At the time I created my rule, the “stays that way for x time” was not a part of RM so I had to figure out a way to incorporate this as a condition, thus complicating my rule.

It is nice to see how the Hubitat team keeps improving the software. Sometimes I actually get motivated to rewrite my rules to take advantage of the improvements just for OCD reasons. However, if my rules are working, I usually get lazy and just leave them as is (again, out of laziness, LOL). Yours is a nice rule though! Let us know if it works after testing. Thanks again.

While I created the reboot-rule as well, this just masks the underlying problem. It looks really strange, that the device is losing half of the available memory in a single day without anything in the logs/statistics indicating any unusual activity...

What activity is occurring at the large drop points (roughly 8:00 and 11:00, the 3-3:30 should be a backup)?

That's the thing - nothing is happening at that time. and I just checked, it is down to 120Mb now :frowning: Will check the log files now, to see if there was any activity.

What time are your local/cloud backups set for? What non built in apps do you have installed?

I have no backups scheduled at all and nothing in the logs when there are these significant memory drops.
Installed apps:

  • Bond Integration
  • Hubitat Package Manager
  • Kasa Integration (no active devices)
  • Lutron Integrator
  • MyQ Lite
  • Obit Bhyve Controller (no active devices)
  • Unofficial Ring Connect

I would start with removing the kasa integration. There have been reports of resource issues. I would also remove obit as well for now during testing.

I got the low memory alert for the first time as well. First time seeing it in ~2 years with hubitat. Rebooted and it's been fine for a few days so far.

Its slowly gettng low. Rule will be tested at <120mb. No idea why... Maybe its supposed to work like this
image

A slow decrease in free memory is normal, as are occasional larger drops that are then mostly recovered semi-immediately.

2 Likes

Well, removed "unnecessary" apps like Kasa, Bhyve, Ring and got it down to the bare minimum with Lutron, Bond, MyQLite - nothing has changed, memory immediately drops. does not recover and within 2 days is below 100k. It worked with ALL apps for 2+ years, so either the OS got too fat, or there is a memory leak somewhere. With quite a few others suddenly experiencing the same issue, I would not be surprised, if this is firmware based.

1 Like


These are fairly normal curves for my hubs. As you can see rebooted 2 of them yesterday, normal first ~30 minute drop as apps get loaded, and then a steady decline over time. Prior to reboot these had gone about 15 days (only because I rebooted them after making a large code update on a couple of packages) before being rebooted for an update. Development C-7 will hold at about that 420 line almost indefinitely when I’m not loading/modify code for testing.

1 Like

For giggles disable myqlite...

While your C-8 hub undoubtedly experiences rapid memory loss, this is not everyone's experience. I only reboot my hubs (C-8 and C-5) when there's a platform update. The screenshots below indicate what the memory usage on my C-8 looks like.

After ~3 weeks of running on 2.3.5.146, there was about 250M free memory. And 2.5 days after loading 2.3.5.152, there's about 350M free memory.

I have no idea what causes the rapid loss of free memory in your hub. But observations such as those from @thebearmay's hubs and my hubs suggest there isn't a generic memory leak in the hub platform.

I also don't know if the numbers of hubs experiencing this issue is as substantial as you perceive it to be.

In my experience over the last 4+ years, the kinds of things that seem to bog the hub down (and cause a rapid decrease in free memory) are:

  1. Unresponsive (or poorly responsive) LAN and cloud integrations.
  2. Poorly responsive z-devices. Good z-mesh health seems to go a long way toward keeping the hub responsive.
  3. Badly-written rules/apps/drivers. The first driver I wrote was a disaster and would slow my automations down to a crawl within a day of rebooting the hub.

1 Like

... my wife would kill me - for giggles :wink:

2 Likes