http server memory issue

sinmosh
Posts: 6
Joined: Mon Oct 17, 2022 3:06 am

http server memory issue

Postby sinmosh » Mon Oct 30, 2023 5:12 pm

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?

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

Re: http server memory issue

Postby mbratch » Mon Oct 30, 2023 8:09 pm

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?

Who is online

Users browsing this forum: No registered users and 221 guests