-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loosing heap #13
Comments
I'm not sure, I don't have an ESP toolchain anymore. Maybe this is inherent to having too many concurrent requests? Would rate-limiting after more than N=5 simultaneous requests be okay for you application? |
Yes url is the same, it is Thingspeak. And I am connecting by domain name. |
OK. |
Try use espconn_delete(conn) before os_free(conn) |
@dexterkhm Does the fix_memleak branch solve the problem? |
I will try today. |
After half a day of testing I am still losing heap. But steps of stable values of heap become longer. It takes about 1 hour of stable heap value then I loose 300 bytes and after come another 1 hour of stable heap value. |
I Think problem with heap losing happens when two "http_get" called from different places at same time. |
@dexterkhm |
Nice!!! how can I download fixed files?? |
@dexterkhm |
#define HTTP_REQUEST_TIMEOUT_MS (10000) 10seconds??? O_o It is too long as I think. I am struggling now for 3 seconds period. And what happens If I "http_get" it again from somewhere while those 10 sec still ticking? |
@dexterkhm This is to take care of some super slow servers and networks :) |
@dexterkhm if 10 sec is ticking while you "http_get" again, you may get 2 reponses(callbacks) |
Please try your code in 2-3 seconds "http_get" request period while server is stuck. And what happens with heap at this time? |
In first 10 sec, the heap is decreasing, after 10s, the heap is stable, and when stop http request, the heap is increasing, and then recover, looks like nothing happend. |
Ok thanks a lot. I will try now. |
Note the http_post API is changed, http header is before http body, and http_delete and http_put have same interface as http_post See also |
I add just your timer func arm and disarm lines, timer callback, added timer var into a structure. And run it .... Well after an while of fast transmite (two timers 3000ms and 15000ms both with httpget)- I still loosing heap that caused with reboot http://s011.radikal.ru/i318/1512/fe/cc45808676c7.jpg |
Hello for a start thanks a lot for your useful code. But I have a problem, when I call "http_get" function too often (less than one second period) i am loosing heap of esp8266 and if "http_get" period bigger than a second everything is ok. Give me a suggestion what to do?
The text was updated successfully, but these errors were encountered: