You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am the creator of the aREST library, which is also compatible with the ESP8266 and uses this library to work. We found out that at each request to the board (the sketch is running a web server on the board), we loose 184 bytes of memory. I think it's related to this issue:
I confirmed that it's indeed due to this, as the memory comes back to normal after a while. However, for our library we often need to process a lot of requests/second, so after a while the board crashes. I read that this 'issue' with the TCP protocol is solved by the ESP8266WebServer library, so how to actually do it for a generic code using the WiFiServer library? Thanks!
The text was updated successfully, but these errors were encountered:
FYI, @me-no-dev did a modification to LwIP stack, now the number of connections kept in TIME_WAIT state is limited. So the memory "loss" should by limited by MEMP_NUM_TCP_PCB_TIME_WAIT * 184, and MEMP_NUM_TCP_PCB_TIME_WAIT is set to 5 in lwipopts.h. For now, this change is available in git version only.
Regarding ESP8266WebServer, the trick is to ask the client to close the connection instead of closing it on the ESP. In TCP, the party which does "active close" has to keep the connection for a long time, while the other party doesn't have to. ESP8266WebServer sends "Connection: close" header to the client, and then waits until client closes the connection.
Yes! Thanks so much for adding this @me-no-dev!!
Under no circumstances should it be acceptable to have any code that just lets the ESP8266 crash.
Hopefully we can get a stable version on github soon... I noticed something was changed after 2.3.0 that easily makes the heap run out and TCP send fails with higher latency connections:
(Issue 2925).
Hello,
I am the creator of the aREST library, which is also compatible with the ESP8266 and uses this library to work. We found out that at each request to the board (the sketch is running a web server on the board), we loose 184 bytes of memory. I think it's related to this issue:
#1923
I confirmed that it's indeed due to this, as the memory comes back to normal after a while. However, for our library we often need to process a lot of requests/second, so after a while the board crashes. I read that this 'issue' with the TCP protocol is solved by the ESP8266WebServer library, so how to actually do it for a generic code using the WiFiServer library? Thanks!
The text was updated successfully, but these errors were encountered: