I remade this post because my title choice was horrible, sorry about that. My new post can be found here: After sending a lot, my send() call causes my program to stall completely. How is this possible?
Thank you very much everyone. The problem was that the clients are actually bots and they never read from the connections. (Feels foolish)
TCP_NODELAYmight help latency of small packets from sender to receiver, but the description you gave points into different direction. I can imagine the following:SO_SNDBUF) and causes the server process to appear “stuck” in thesend(2)system call. At this point the kernel waits for the other end to acknowledge some of the outstanding data, but the receiver does not expect it, so it does notrecv(2).There are probably other explanations, but it’s hard to tell without seeing the code.