-
Notifications
You must be signed in to change notification settings - Fork 4
Having problemen with AsyncHTTPS memory leak #11
Comments
Hi @roel80 Thanks for your bug report and the detailed investigation. I'd appreciate it if you can help investigate, locate, fix the bug, post a PR, if possible, to speed up squash the bug much faster. Regards, |
I have the same problem, each Ticker cycle the memory is not released, until it finishes and all other requests are cashed. How to clear memory ? AsyncHTTPSRequest request; |
+1 I am having the same issue. Finally tracked it down to AsyncHTTPSRequest. It leaves me a bit stuck - I cannot deploy the project with this issue. I see it has been an issue here for a while... does anyone know of alternative libraries which do async HTTPS requests? Here is some debug output
|
Looking at the code, I notice there are 22 calls to "new" in AsyncHTTPSRequest_Impl_Generic.h. (e.g. see below) Could this be the issue? I am not sure if this is good programming practice... I also notice that the non-SSL version, AsyncHTTPRequest_Generic, does not call new at all, and also does not have the same memory leak ...
|
I hope you know where to read the code ... |
Just submitted a proposed fix for memory leak. ref; |
AsyncHTTPSRequest @ IP : 172.16.16.191 |
Hi @roel80 The AsyncHTTPSRequest_Generic v2.2.0 has just been released. Your contribution is noted in Contributions and Thanks. Please help with more rigorous tests to see if there is any more memory-related issues. As you know, there is so much a guy can do, especially with too many libraries to develop and take care, without the help of many more people. Still waiting for more bug reports and fixes from you ;=}} The library is better and better thanks to contribution users like you. Best Regards, Releases v2.2.0
|
Describe the bug
When utilizing the AsyncHTTPS library there is a decrease of the available heap space with about 100 to about 200 bytes per https request until it runs out of heap space and crashes.
Steps to Reproduce
I modified the included example slightly to demonstrate the problem;
uint previousHeapSize = ESP.getFreeHeap();
Commented out the ticker1.attach within setup()
//ticker1.attach(HEARTBEAT_INTERVAL, heartBeatPrint);
Decreased the HTTPS_REQUEST_INTERVAL to 10 seconds to faster show the problem, although it also happens when you leave the interval to the example's default
Expected behavior
Expected for the free heap size to be remain stable after initial initialization with minor variations both in increase and decrease of available free heap space.
Actual behavior
The modified demo shows an ongoing decrease of available heap space:
Debug and AT-command log (if applicable)
N/A
Screenshots
N/A
Information
The text was updated successfully, but these errors were encountered: