I had these issues on my son's C8 so I posted a question and the suggestion was a backup and restore. Tried it and he hasn't lost a byte in 2 days. Before he was down from 450K to 140K in 2 days; hub warnings in the days to follow!
A restore can definitely help in some scenarios. It is the 1st thing I do if I see what I think is excessive memory drain. It often helps, and I've never seen it hurt in any case.
I haven't reboot my dev hub in a long time and it has 550K+ memory left. So the base platform itself seems to be doing pretty well in terms on memory leaks/memory exhaustion.
Seems positive then really doesn't it
I was the same with VAX/VMS. We had many systems with uptimes in the years and the only reason it got reset was intentional upgrades of the OS every couple years. If we didn't upgrade the OS the uptimes were multi-years.
I don't understand this current mentality that memory leaks are acceptable. Any "leak" should be considered a bug. It might not be considered serious in this environment, but still a bug that should be tracked down and fixed.
Scheduled reboots are a band-aid at best and really should not be SOP in anybody's "best practices" list. Lets call it what it is. It's a simple hack to get around a system bug.
Has anyone actually advocated for that?
There are many many posts stating that scheduled reboots are standard procedure. And there are even a few community apps written to help facilitate it.
Any user can make their own standard procedure but it’s always been considered a band-aid when I’ve seen staff address the question .
I tried your tool @wiegout and it predicted doom would happen 3 days ago Also extrapolated a negative max days of runtime, I'm guessing your model makes the assumption that free OS memory monotonicaly decreases... which isn't the case.
I've got this C7 running for 25+ days now and while it struggles to keep free OS memory above 80 MB, has been succeeding for the last a week, with periods above 100 MB. Who wants to bet for how much longer it will continue to stagger along ? Automations are still running and snappy (except, I suppose, when the zigbee radio occasionally reboots). If I wasn't looking at these metrics, I wouldn't know anything is wrong (if a tree falls in the forest and no one ...).
I agree on principle, but c'mon guys, it's a $150 system, not $15,000 or $150,000
Sure. Pragmatically though, what are you going to do? End users don't have the tools required to diagnose these memory issues. Many don't want to spend the time anyway - their prerogative. And our employers' IT departments have drilled it into our psyche that "monthly restarts" are SOP.
Sorry, the tool is never wrong. Your hub died 3 days ago. I'm sorry for your loss.
Or, it made a bunch of bad assumptions based upon the behavior that I observed... NAH
I didn't mention the $25 Raspberry Pi systems I'm running that have no memory leaks and would most likely have uptime measured in years if I had battery backups on them.
I don't care if its a $10 system or a $100,000 system. A memory leak is not normal. Memory management has seemed to improve with 2.3.6 and kudos to gopher for that.
But it still leaks. Its a bug that should be fixed (after how many years? ) and not just more band-aids
Not if you were running complex Java apps on it, it wouldn't. Guess what the underlying architecture of Hubitat is.... Java! Is what it is, and wishing it was something else serves no purpose at this point.
I'm glad they continue to work on it, and improve it though.
So for those of us in the back of the bus, How do we know if there is a memory leak? how much is Normal use vs Excessive? What should we be looking at and for?
In their defence. Do we know if it's a hub/software issue or an issue of the devices connected to it/third party apps.
Ironically... in so many ways (both hardware & software) we are LIGHT YEARS beyond what was in those DEC boxes back then.
You'd think by now there would be VERY intelligent software oversight both at the development stage and the runtime stage that would be all over "memory misbehavior" in code & hardware... so that it is dealt with, well before it ever becomes a problem in the application environment.
I mean hasn't this behavior been a stepping stone for hacks on various platforms.... and thereby a priority problem to reign in across the board?
Yet there's still plenty of "live with it cause it happens" allowances for it. Not saying it isn't a challenge to be dealt with, I'm just naively shocked that it's still "a thing".
Just saying. Not hanging any dirty laundry here.
It's a shame where this conversation headed, for what was such a positive thankyou to the team for their work in improving the platform....
No no, I don't think that it's bad that folks are trying to understand why it still happens.
I don't either. I just feel this topic, at least, could have been left as a positive news story. If people are experiencing issues, and I'm likely in that camp too, peoples specific circumstance and symptoms could be explored in other threads, that's all.
There's a URL that will show you the current free memory. Snapshots are taken every five minutes. Substitute your hub IP or name in this URL:
Agree. As the OP, I really did mean this to be an "attaboy" to the developers. As a recovering programmer myself (been a long time) I had my heart broken by Java too. It was such a cool idea and an almost irresistible value proposition: "Write Once, Run Everywhere." Yeah, but it hasn't worked out that way. It turned out to more famously be "Write Once, Debug Everywhere." Hubitat stuff runs on Java, that's the SmartThings legacy that the HE developers are stuck with. They are making the most of it and continue to improve things. The JVM will never be as good at managing memory as finely tuned C or C++ (or Assembly- I'm that old) but it's pretty good and with the improvements made, my hub which runs a ton of devices and integrations can go more than a month between boots. And I'm happy about that. Pictured: some of my little Java (Duke) friends on a high shelf. Including my long long ago "Sun Certified Java Programmer" pin. As I said, Java wooed me and left me battered and bruised long ago. I have stories...
I don't know code or coding, but what's the problem with java