[En-Nut-Discussion] Too many very fast opened / closed TCP connections may let the system run out of memory

Ole Reinhardt ole.reinhardt at embedded-it.de
Sun Jan 12 20:38:12 CET 2014

Hi Harald,

Am 12.01.2014 12:08, schrieb Harald Kipp:
>> But we should think about, if there may be any solution to limit the
>> memory usage, while still correctly implementing the TCP standard
>> requirement.
> IMHO, it is generally a bad idea using short lived TCP connections.
> Sooner or later this will bring down every machine. What's the actual
> need to do so?

There is no need :-) I found this while doing my reliability tests of my
connect timeout implementation. This was just a kind of stress test.

> A client may reduce his connection rate based on available memory. For
> the passive server this is a bit more difficult. So far I throttled the
> server in low memory situations by simply adding a NutSleep before
> accepting new connections. Of course, this may result in connection rejects.

Perhaps it is a good idea to leave a comment anywhere in the
documentation? Should I add a hint to NutTcpConnect()?



kernel concepts GmbH            Tel: +49-271-771091-14
Sieghuetter Hauptweg 48         Mob: +49-177-7420433
D-57072 Siegen

More information about the En-Nut-Discussion mailing list