Memory Leakage?

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post
manjh
Posts: 252
Joined: Saturday 27 February 2016 13:49
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: NL
Contact:

Re: Memory Leakage?

Post by manjh » Wednesday 11 October 2017 19:28

jvandenbroek wrote:
Wednesday 20 September 2017 15:10
manjh wrote:
Monday 18 September 2017 21:19
Memory usage increases from 8% to 10% over the past four days. I understand that 10% is nothing to worry about, but the slope of the graph is: is goes up consistently.
I use the Pi for Domoticz only, run lua scripts (not Blockly).
Are you sure there are no errors in de log which might indicate that Lua scripts never finishes? Something like "warning script took more than 10 seconds to execute", it's not guarantied that they will ever finish (thus holding the allocated memory). I suppose you could test it easily by temporary disabling all Lua scripts and see what happens in a few hours. 8 to 10% is way too much, my experience is that it will almost stay the same after a few min after starting up.

@manjh I now see that you're not the TS. You mentioned rebooting the Pi, but then we don't know if it's Domoticz causing the climb. Does restarting just Domoticz result in the same dip? In that case, try what I said above (disabling Lua).
Thanks for the tip! I investigated the log, and found a LUA script that would run more than 10 seconds occasionally. This script tried to pull devices from a roomplan. I replaced this script by one that simply has an array of device names, and it now runs quickly and does not run long.
Result: memory is now stable at about 6%!
I am happy now...... :)
Hans

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Saturday 14 October 2017 0:33

Memory Leak is now also in the beta versions...
Grtz, Hans

pj-r
Posts: 245
Joined: Wednesday 17 December 2014 18:30
Target OS: Linux
Domoticz version: V3.8650
Location: Jyväskylä, Finland
Contact:

Re: Memory Leakage?

Post by pj-r » Monday 16 October 2017 12:20

DutchHans wrote:
Saturday 14 October 2017 0:33
Memory Leak is now also in the beta versions...
Grtz, Hans
What version you was using before the problem occurred and what is your version now?
Whats causing this on your setup: Lua, dzVents, blocky. timers, some HW..? Can you try to disable these one by one and see if it has any effect?
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors

DennisD
Posts: 59
Joined: Friday 18 September 2015 21:46
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Memory Leakage?

Post by DennisD » Monday 16 October 2017 15:57

I enabled zram and it helped alot to keep the memory low, i followed this: https://www.novaspirit.com/2016/12/24/i ... pberry-pi/
In my case the memory begins at 9% creeps up to 15% (time span of 12 hours) and then drops to 9% again. This however is not a solution tho but just a quick fix.

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Friday 20 October 2017 15:34

I installd it too, but am not happy with it... Domoticz crashed for the first time in months..

I wonder who else is suffering from this memory leak.. maybe we can pin-down where the source is..

Cheers and have a nice weekend,
Hans

User avatar
Siewert308SW
Posts: 499
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: Memory Leakage?

Post by Siewert308SW » Friday 20 October 2017 17:36

DutchHans wrote:
Friday 20 October 2017 15:34
I installd it too, but am not happy with it... Domoticz crashed for the first time in months..

I wonder who else is suffering from this memory leak.. maybe we can pin-down where the source is..

Cheers and have a nice weekend,
Hans
Really don't have a clue about the amount of affected users.
I do know and can remember it was mentioned a long time ago.
It didn't bother me or better said i didn't pay attention to it as my Pi3 is rebooted every 24 or 48 hours due to me fiddling with it.
This time i will let up and running for a couple of days and see when (if it does) stabilizes.

Over the last two years of me using the beta's i didn't found a solution or clue what it could cause.
It aint a script which is running in a loop or other malfunction in a script.
Last two years i tried a lot but gave up.
I did notice as you al noticed as well it is something in the eventsystem.

For now i will let my Pi up and running for a couple of days with out rebooting.
Will see how far the memory usage is taking it.

One little question:
The show Memory usage in Domoticz is showing how much Domoticz is using, right.
As the real memory usage as shown in cli and there for counting the entire usage by the system is more the shown in Domoticz
chart.png
chart.png (76.81 KiB) Viewed 720 times
otd_20-10-2017.png
otd_20-10-2017.png (55.93 KiB) Viewed 717 times
Setup:
1x RPi3 - PIco hv3.0A Plus / Domoticz
1x RPi3 - PIco hv3.0A Plus / PiHole
1x RFXtrx433E / Aeotec ZW090
3x FI9803P Cam
2x Youless Elec/Gas
4x KD101 detectors
a lot of KaKu/z-wave stuff

Domoticz scripts: @ GitHub
pico_installer: @ GitHub

ArieKanarie
Posts: 34
Joined: Saturday 12 December 2015 14:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Memory Leakage?

Post by ArieKanarie » Thursday 02 November 2017 23:01

Same problem here, version V3.8153 (with some blockly scripts running)

Image
Yesterday evening a few reboots because Domoticz keeps hanging:

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Thursday 02 November 2017 23:09

IMG_20171102_220620.png
IMG_20171102_220620.png (76.38 KiB) Viewed 590 times
Same here, no blockly...

Grtz, Hans

jeanclic
Posts: 61
Joined: Saturday 28 January 2017 12:32
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France / Burgundy
Contact:

Re: Memory Leakage?

Post by jeanclic » Friday 03 November 2017 8:20

Hello,

Yes, there is memory leak in the stable 8153. It is a memory leak related to the event system.

So either you disable all event system, or you move to beta where this issue is fixed...

A third solution (short term) is to reboot domoticz at a frequency or via some script watching memory...

Envoyé de mon BLN-L21 en utilisant Tapatalk

RPI3B+PiDrive (Domoticz 3.8649 + ~60 scripts) + RFXtrx433E (fw1020) + Z-Stick Gen5 / RPI2B+ (RasPlex)
x1 Eth. wired tablet
x8 T/H Oregon / x1 T/H Bresser
x7 Di-o with 1N4007 / x2 QUBINO "Flush 1 relay"
x10 plugs / x15 contacts
x4 fibaro / x1 PIR

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Friday 03 November 2017 11:05

I disagree, I am on Beta and yesterday it wasn't fixed in the Beta channel...or is it now?

Grtz, Hans

User avatar
EddyG
Posts: 145
Joined: Monday 02 November 2015 6:54
Target OS: Raspberry Pi
Domoticz version: 3.8789
Location: Netherlands
Contact:

Re: Memory Leakage?

Post by EddyG » Friday 03 November 2017 11:27

Could not find anything related to this memory problem on github.
Could anyone from the developers comment on this?
Regards,
Eddy

jeanclic
Posts: 61
Joined: Saturday 28 January 2017 12:32
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France / Burgundy
Contact:

Re: Memory Leakage?

Post by jeanclic » Friday 03 November 2017 12:49

In my 3.8649 version of domoticz, I have no more issues regarding memory leakage...

Envoyé de mon BLN-L21 en utilisant Tapatalk

RPI3B+PiDrive (Domoticz 3.8649 + ~60 scripts) + RFXtrx433E (fw1020) + Z-Stick Gen5 / RPI2B+ (RasPlex)
x1 Eth. wired tablet
x8 T/H Oregon / x1 T/H Bresser
x7 Di-o with 1N4007 / x2 QUBINO "Flush 1 relay"
x10 plugs / x15 contacts
x4 fibaro / x1 PIR

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Friday 03 November 2017 16:04

I've updated to Beta 8692 but the memory leak is still present. It is still climbing...
IMG_20171103_150043.png
IMG_20171103_150043.png (69.48 KiB) Viewed 539 times
Regards,Hans

User avatar
EddyG
Posts: 145
Joined: Monday 02 November 2015 6:54
Target OS: Raspberry Pi
Domoticz version: 3.8789
Location: Netherlands
Contact:

Re: Memory Leakage?

Post by EddyG » Friday 03 November 2017 17:27

That's why I asked the developers to comment.
It would be nice that the problem is found and solved.
But I could not find that being addressed on github.
Regards,
Eddy

jeanclic
Posts: 61
Joined: Saturday 28 January 2017 12:32
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France / Burgundy
Contact:

Re: Memory Leakage?

Post by jeanclic » Friday 03 November 2017 19:53

Are you using particular hardware which could be at the origin of the leak ?

Find enclosed some screenshots of my domoticz setup in beta 3.8649 on a RPI3B with a PiDrive, not on SD card. -> no more leaking observed since I moved to beta. Being satisfied with the 8649 version, I will not update for now till I validate a new one on my test system (I would prefer a stable release, but to be defined...)

-> validated during 12 days of uninterrupted uptime on jessie and so far 6 days and 9 hours on stretch... (no DzVents running, so maybe something for those who are experiencing troubles ?)
EDIT : no blocky script but about 30 lua scripts.
Attachments
2017-11-03 RPI RAM.png
2017-11-03 RPI RAM.png (325.82 KiB) Viewed 516 times
2017-11-03 Domoticz RAM.png
2017-11-03 Domoticz RAM.png (300.01 KiB) Viewed 516 times
2017-11-03 Domoticz HW.png
2017-11-03 Domoticz HW.png (51.35 KiB) Viewed 516 times
RPI3B+PiDrive (Domoticz 3.8649 + ~60 scripts) + RFXtrx433E (fw1020) + Z-Stick Gen5 / RPI2B+ (RasPlex)
x1 Eth. wired tablet
x8 T/H Oregon / x1 T/H Bresser
x7 Di-o with 1N4007 / x2 QUBINO "Flush 1 relay"
x10 plugs / x15 contacts
x4 fibaro / x1 PIR

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Friday 03 November 2017 21:03

Screenshot_2017-11-03-19-52-21.png
Screenshot_2017-11-03-19-52-21.png (114.13 KiB) Viewed 500 times
Screenshot_2017-11-03-19-52-38.png
Screenshot_2017-11-03-19-52-38.png (119.15 KiB) Viewed 500 times
Here's my hardware line-up..nothing strange. LMS and WU are disabled. One python script (presence detection) and about 30 lua scripts. Many http requests for my notifications in the lua scripts.
Maybe this helps clearing the memory leakage.

Cheers and have a nice weekend,
Hans

jeanclic
Posts: 61
Joined: Saturday 28 January 2017 12:32
Target OS: Raspberry Pi
Domoticz version: Beta
Location: France / Burgundy
Contact:

Re: Memory Leakage?

Post by jeanclic » Friday 03 November 2017 21:51

hello again,
In an other topic, some guys have «fix» the memory leak by disabling MyDomoticz. Has anyone here tried that ?

Envoyé de mon BLN-L21 en utilisant Tapatalk

RPI3B+PiDrive (Domoticz 3.8649 + ~60 scripts) + RFXtrx433E (fw1020) + Z-Stick Gen5 / RPI2B+ (RasPlex)
x1 Eth. wired tablet
x8 T/H Oregon / x1 T/H Bresser
x7 Di-o with 1N4007 / x2 QUBINO "Flush 1 relay"
x10 plugs / x15 contacts
x4 fibaro / x1 PIR

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Friday 03 November 2017 22:23

Thats a negative..i have not enabled mydomoticz...
So that can't be it..

Cheers, Hans

DutchHans
Posts: 280
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Memory Leakage?

Post by DutchHans » Saturday 04 November 2017 9:38

Memory was about 20 percent, after a restart of Domoticz it fell back to about 16 percent...after a complete reboot it dropped at around 13 percent..but its rising in all three circumstances.
IMG_20171104_083324.png
IMG_20171104_083324.png (71.69 KiB) Viewed 454 times
I hope this can be usefull for the developers.
Regards,Hans

ArieKanarie
Posts: 34
Joined: Saturday 12 December 2015 14:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Memory Leakage?

Post by ArieKanarie » Saturday 11 November 2017 13:20

I am now on V3.8073 and now the memory is dropping... :)

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests