I seem to have some kind of memory leak going on on my VeraEdge and i’m trying to figure out why…
When i reboot my vera, i have around 55MB+ free per top…
You can see it drop pretty steadily and in a matter of a couple of days it’s down to ~10MB free…
if i restart LUA, the amount of memory free jumps back up to~ 30MB
if I reboot the vera, the amount of memory free returns to ~55MB+
At some point it becomes unresponsive. I have to powercycle it because it stops working and i can’t even ssh to it…so i’m assuming that it has all the signs of a memory leak…
I heard virtual switches and plugins cause the greatest loss of memory available. If the controller is performing badly due to this then start removing plugins till you find a culprit. I’m sure it is one of them causing that.
Plugin Devices (that do not have a controlling device) use about 2MB per device …
In UI5 you could use the advanced tab to find out if a device has a controlling device … you can’t do that in UI7 … you just have to know!
Devices that have a controlling device and as a result are memory cheap are:
Z-Wave devices
Sensors attached to an Alarm Device, although the alarm device itself requires 2MB.
Multi-Sensor slave devices …
Wifi Power Strip switches (the actual Power Strip devices takes 2 MB)
So if you have 8 Virtuals switches, you will use 16MB vs 2MB for a multi-switch.
I recommend everyone make a scene to reboot your box every night.
Everything will run smoother.
Problem solved.
which is not to say that MCV should not continue to try and deliver working stable firmware.
|-<:)
I have had issues with my Vera3 freezing or becoming unresponsive due to memory leaks and prophead’s suggestion is a good one and it helped considerably but it wasn’t bulletproof. If Vera froze then the reboot scene would not run or execute.
As I manage my Vera remotely most of the time I found using a $10 digital timer we all used to control lights before the world of Vera. I have it turn Vera off at 3:00am every night and back on at 3:01. Since I have been doing this, my Vera has been running very smoothly, however on the rare occasion if I do encounter a lockup I just have to wait until after 3:01 am and I should be back in action again.
I have a ton of devices (close to 100) and about 6 PLEGs and a number of virtual devices about 8 cameras and its integrated with our DSC alarm which has another 28 zones. Any scenes that use delays that run through the night I put into a PLEG so the delays and timers survive the restart. Works very well.
I have SysMon running on my systems and if the availble memory goes below some point I have luup reloaded. That will clear the memory leaks from the plugins and all else that runs in the luup enige.
However I notice that over time avaible memory keep dropping and only a reboot helps. This suggests firmware memory leaks and not just bad behaving plugins. Oddly my VeraLite seems to suffer much less from this then the Edge.
To make a reboot happen you can also create a scheduled scene with a bit a LUA code that just says:
luup.sleep(5)
os.execute(“reboot”)
The sleep i added to make sure the scene handling is not interrupted to quickly. Just a hunch, no science behind it.
local ping = os.execute("ping -c 1 8.8.8.8")
if ping ~= 0 then
luup.log("Auto Reboot: Network down. Aborted.")
else
luup.log("Auto Reboot: Network OK. Rebooting in 2 seconds.")
luup.sleep(2000)
os.execute("reboot")
end
It checks if there is an internet connection , if no internet connection >>> no reboot.
I had a couple of times an issue when my internet connection was down and after rebooting a non responsive vera.
I wrote a rule in Elk that trips a relay on my Elk that shuts pwr to Vera so it reboots every 24 hrs. Use an external source to boot Vera. Not a scene. It will not be reliable unless you do it from an independent source.
I am close to three layers now. Monitoring availble memory in LUUP and a reload when that get too low. A bi-weekly execution of a scene that will issue a reboot of the device, and if that does not do it, i also have a Pi running openLuup and VeraBridge. If that fails to poll a Vera for more that five minutes, I switch it off and on via the other Vera. This last resort rarely kicks in though. It did a bit more on the last years versions of UI7, but that last three are not so bad anymore.
Cheers Rene
Best Home Automation shopping experience. Shop at Ezlo!