emsesp / EMS-ESP32

ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
https://emsesp.github.io/docs
GNU Lesser General Public License v3.0
627 stars 107 forks source link

Free Memory decreased by HTTP API requests #2216

Open semmel3k opened 2 hours ago

semmel3k commented 2 hours ago

DESCRIPTION

With frequent HTTP API requests every minute (for example with "/api?device=boiler&cmd=info") , the free memory continuously decreases until the module freezes after 45 minutes. No other services active (MODBUS off; MQTT off, etc.). This occured with latest 3.7.0. and 3.7.1. developer version with ESP32-S3.

TO REPRODUCE

frequent HTTP API requests

EXPECTED BEHAVIOUR

That the free memory not decreases and no freeze

proddy commented 2 hours ago

Thanks for reporting. We'll try and reproduce it. Can you send your Support Info please so we can see what hardware, memory etc is being used. Did you notice the same behaviour with v3.6.5?

semmel3k commented 2 hours ago

I guess the problem was also with v3.6.5 image

proddy commented 2 hours ago

There's a benchmark load test I wrote a while back at https://github.com/emsesp/EMS-ESP32/blob/dev/scripts/run_memory_test.py . I'm not sure it works with the latest 3.7.0, so probably needs updating.

I don't know how 'techie' you are, but it'll help if you could try and reproduce this using a script (maybe with curl or a Python equivalent) and help trace where it's breaking. Or look into advancing that script above.

semmel3k commented 2 hours ago

The frequent requests I do with my Gira Homeserver. How can I trace the issue? Currently I can only see the discrease of free memory every 3-10 seconds. Now I'm using MODBUS and this works well.

proddy commented 1 hour ago

It's ok. It's just a script that uses curl and makes frequent API calls while monitoring the memory. I'll can work on that. The Gira homeserver is KNX based, you may be interested in the great work @Ing-Dom has been doing at https://github.com/emsesp/EMS-ESP32/discussions/1737