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…
before screenshot of top:
after retstarting LUA:
after rebooting vera:
apps installed include: PLEG, PLC, Day or Night, Virtual ON/OFF switches, Ping Sensor, Wunderground Weather plugin, VeraAlerts, iPhone Locator Plugin, MultisString, Onkyo Receiver (AVR).
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:
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.
maybe i’m just getting to the point where i have too many devices?
currently i have…
1 dimmable light
15 dimmable switches (for lights)
6 on/off switches (for lights)
3 door/window sensors
4 motion sensors
4 scene crontrollers
4 temperature sensors
2 humidity sensors (technically from aeon multisensor)
1 light sensor (from multisensor)
1 uv sensor (from multisensor)
1 indoor switch (aeon wall plug)
2 multistring devices
3 virtual switches
1 ping sensor
9 misc interfaces
1 iphone locator
7 PLEG devices
My dibs are on the Ping, iPhone locator, or Onyko plug in causing a leak. Or Maybe the Wunderground doesn’t look like too many devices.
I recommend everyone make a scene to reboot your box every night.
Everything will run smoother.
which is not to say that MCV should not continue to try and deliver working stable firmware.
That’s a lot of devices that use memory.
Sent from my SAMSUNG-SM-G935A using Tapatalk
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.
[quote=“prophead, post:6, topic:195373”]I recommend everyone make a scene to reboot your box every night.
Everything will run smoother.
Then the question: how to make such a scene ?
You should have more free than that still.
I thought the list of devices you showed was quite small
I’m up to over 30 virtual switches and God knows what else and have a pretty steady 80mb free.
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:
The sleep i added to make sure the scene handling is not interrupted to quickly. Just a hunch, no science behind it.
Someone on this forum wrote this:
local ping = os.execute("ping -c 1 126.96.36.199")
if ping ~= 0 then
luup.log("Auto Reboot: Network down. Aborted.")
luup.log("Auto Reboot: Network OK. Rebooting in 2 seconds.")
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.