memp_malloc: out of memory in pool TCP_PCB

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

memp_malloc: out of memory in pool TCP_PCB

Mario Luzeiro
Hello all,

I'm running a HTTPD over ALTPCB / MBEDTLS

It all works ok until I start to make lots os http requests (eg open multiple pages)
No matter how much I increase MEMP_NUM_TCP_PCB, after a while, I will get this error:
memp_malloc: out of memory in pool TCP_PCB

I notice that httpd is closing the connection, also I got
tcp_slowtmr: no active pcbs

but if I debug TCP_PCB they will keep the value high and event if I close all webpages in the browser, I will get the errors when I get back to open a new webpage request.

Is that error a normal behavior or how can I fix it?

Mario Luzeiro
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: memp_malloc: out of memory in pool TCP_PCB

goldsimon@gmx.de
Am 24.10.2019 um 18:57 schrieb Mário Luzeiro:

> Hello all,
>
> I'm running a HTTPD over ALTPCB / MBEDTLS
>
> It all works ok until I start to make lots os http requests (eg open multiple pages)
> No matter how much I increase MEMP_NUM_TCP_PCB, after a while, I will get this error:
> memp_malloc: out of memory in pool TCP_PCB
>
> I notice that httpd is closing the connection, also I got
> tcp_slowtmr: no active pcbs
>
> but if I debug TCP_PCB they will keep the value high and event if I close all webpages in the browser, I will get the errors when I get back to open a new webpage request.
>
> Is that error a normal behavior or how can I fix it?

No, that's not normal behaviour. It seems like old connections aren't
properly closed and then no new connections can be opened.

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: memp_malloc: out of memory in pool TCP_PCB

Mario Luzeiro
Hi Simon,

So any hint how can I debug it?
Should it be an application or lwip issue?

I did some debug and can see the httpd and tcp closing connections (serial port debug) but the TCP_PCB slots stay the same.
Please note that I'm still able to connect and there are no any issues with httpd connection,
that's why I'm wondering if it was a normal behaviour.
I can see the number stays full and while I try new httpd (https) connections it will once in a while produce that error.

Let me know if I can get some output debug for you.

Mario Luzeiro

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of [hidden email] <[hidden email]>
Sent: 24 October 2019 19:27
To: Mailing list for lwIP users
Subject: Re: [lwip-users] memp_malloc: out of memory in pool TCP_PCB

Am 24.10.2019 um 18:57 schrieb Mário Luzeiro:

> Hello all,
>
> I'm running a HTTPD over ALTPCB / MBEDTLS
>
> It all works ok until I start to make lots os http requests (eg open multiple pages)
> No matter how much I increase MEMP_NUM_TCP_PCB, after a while, I will get this error:
> memp_malloc: out of memory in pool TCP_PCB
>
> I notice that httpd is closing the connection, also I got
> tcp_slowtmr: no active pcbs
>
> but if I debug TCP_PCB they will keep the value high and event if I close all webpages in the browser, I will get the errors when I get back to open a new webpage request.
>
> Is that error a normal behavior or how can I fix it?

No, that's not normal behaviour. It seems like old connections aren't
properly closed and then no new connections can be opened.

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users