SuperSimpleTcp icon indicating copy to clipboard operation
SuperSimpleTcp copied to clipboard

An active client with keep alive that does not process incoming message leads memory buildup in the server

Open MarkBreedveld opened this issue 1 year ago • 1 comments

We had a buggy client that failed to process incoming messages fast enough with keep-alive enabled. The result was that connection remained active with a full receive buffer. The server kept waiting for client to empty his buffer, which did not happen. As result the async send tasks where not processed and kept building up leading to excessive memory usage on the server side.

Of course, the main issue here is the client that does not start processing. But that does not mean server should be hang up by one of the many clients. I am working on fix that limits the outstanding task per client. I am not shure yet if that should also result in a disconnect. Maybe good thing to debate here.

And I have the feeling that same issue also exist on the client side. But lets take that into account as well.

MarkBreedveld avatar Mar 02 '23 07:03 MarkBreedveld