[resolved] Python Framework - New Domoticz.Configure() API - memory leak Topic is solved

Python and python framework

Moderator: leecollings

Post Reply
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

[resolved] Python Framework - New Domoticz.Configure() API - memory leak

Post by pipiche »

I have made a small plugin, which is loading 217KB json file, converting it into a Dictionary and then saving with the Configure() method.

Then via the onHeartbeat,

I'm loading the dictionary from Configure()
incrementing a simple counter
saving it back with with Configure()

This is immediatly starting to consume memory without releasing it.

The fact to use a large data dictionary just speed up the process, but similar happens with a very short dictory

Here is the plugin

untar it on the plugins folder
move the file export.json to /tmp (or update the plugin.py , so it loads from somewhere else)
MemoryLeak.tar.bz2
(14.44 KiB) Downloaded 55 times
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: [resolved] Python Framework - New Domoticz.Configure() API - memory leak

Post by pipiche »

fixed with the latest beta version.
eddieb
Posts: 428
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: [resolved] Python Framework - New Domoticz.Configure() API - memory leak

Post by eddieb »

thanks for this fix. running 13495 for 16 hours now and memory use is still under 90MB here !
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Post Reply