Page 1 of 1

Need help to stress test a tcp server memory usage

Posted: Mon Nov 17, 2025 2:22 pm
by tatanas
Hi,

I have developed a Windows server application that approximately 400 clients connect to simultaneously.
However, I believe there is a memory leak. Memory usage keeps increasing, even though it’s quite small (around 20 MB per day). I’ve checked threads, mutexes, memory allocation, JSON creation, and so on, but I haven’t found anything.
Therefore, I want to test how an extremely simple TCP server behaves under a large number of connections/disconnections, both with and without TLS. Maybe my way of monitoring memory usage isn’t accurate, so I’m reaching out to you.
Could you provide me with very simple code for:

A client that creates a large number of connections/disconnections in a short time
A server that accepts these connections and displays real-time memory usage

(Regarding TLS, I already have a certificate and a private key.)

Thank you in advance

Re: Need help to stress test a tcp server memory usage

Posted: Mon Nov 17, 2025 5:38 pm
by miskox
Not really an answer to your question but might help you to locate the file (.dll?) that causes memory leak. See https://www.dostips.com/forum/viewtopic.php?t=5495

In 2014 I found a memory leak in ESET antivirus.

Saso