Need help to stress test a tcp server memory usage
Posted: Mon Nov 17, 2025 2:22 pm
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
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