Memory error after certain number of connect/disconnects.

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

Memory error after certain number of connect/disconnects.

sarp
Dear members,

I have a TCP client using raw API which switches connection between servers
after data transmission.


Scenario Loop:

Connect to 1st server.
Transmit data.
Disconnect.
.
.
Connect to nth Server.
Transmit data.
Disconnect.

Go to First connection again...


Although using the documentation well (creating the control blocks in the
correct manner and destroying them properly), I get memory error after
certain number of connect/disconnects..

What is the reason of having memory error if the control blocks are created
and destroyed equally?

*Is the problem about having the time duration low between new
connection/disconnection?

*I am sure that the number of creation and destroying of the buffers and
control bloks are the same.

-Is there a disconnection timeout to clear memory out?

Any help is appreciated..
Kind Regards




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

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

Re: Memory error after certain number of connect/disconnects.

goldsimon@gmx.de
Am 27.03.2019 um 17:02 schrieb sarp:

> Dear members,
>
> I have a TCP client using raw API which switches connection between servers
> after data transmission.
>
>
> Scenario Loop:
>
> Connect to 1st server.
> Transmit data.
> Disconnect.
> .
> .
> Connect to nth Server.
> Transmit data.
> Disconnect.
>
> Go to First connection again...
>
>
> Although using the documentation well (creating the control blocks in the
> correct manner and destroying them properly), I get memory error after
> certain number of connect/disconnects..

I'm afraid you'll have to be a *little* more precise here if you
actually want an answer: What kind of error, where, when, etc. - try to
be as precise as you can get while staying as short as you can.

Regards,
Simon

>
> What is the reason of having memory error if the control blocks are created
> and destroyed equally?
>
> *Is the problem about having the time duration low between new
> connection/disconnection?
>
> *I am sure that the number of creation and destroying of the buffers and
> control bloks are the same.
>
> -Is there a disconnection timeout to clear memory out?
>
> Any help is appreciated..
> Kind Regards
>
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Memory error after certain number of connect/disconnects.

sarp
In our application, we are continously connecting to server devices to
collect data in local network.
That's why we are connecting to IP_DEVICE1, getting data and closing
connection of IP_DEVICE1.
It sequentially continue to the n'th device.

After a certain time, tcp_connect function returns "ERR_MEM" and then, LwIP
client is not able to connect server devices until reset. Each poll time is
2 secs in this application. That means that every 2 secs, device connects to
the i'th device, collects data and closes connection.

Thanks in advance.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

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