Page 1 of 1

http server memory issue

Posted: Mon Oct 30, 2023 5:12 pm
by sinmosh
Hello

I use esp-idf v4.4 http server with websocket and noticed tha the code leaks memory (by calling esp_get_free_heap_size()) when a new client connection from a browser happens. The code doesn't release the heap even after the connection gets closed.

here is the server configs that I use:

config.lru_purge_enable = true;
config.max_open_sockets =4;
config.enable_so_linger = true;
config.linger_timeout = 1;

Any idea what can be wrong?

Re: http server memory issue

Posted: Mon Oct 30, 2023 8:09 pm
by mbratch
I've used ESP-IDF 4.4 implementing a web server and have not experienced a memory leak.

What does your websocket or http server handler do? Is (or are) the handler (or handlers) using dynamic memory?