I have a beefy server where I am listening to 24K unique tcp sockets on a single process. I have increased the FDs on system and all required(somaxconn, backlog and so on ) parameters to increase the number of TCP connections that can be accepted. However it does not seem to go beyond a certain value (94K). But if I reduce the number of unique TCP sockets to say just 5-10, I can reach around 250K connections easily.
Btw, I see that kernel has accepted the connection as from tcpdump I is see 3 way handshake being completed. Only application is not able to accept it. I have dedicated thread on the server application to constantly poll for incoming connections on all the 24K sockets (so CPU is not an issue)
Application accepts it but after huge delay (Around 90 seconds or so)
So, the question is. Is there a limit of number of connections that can be accepted by application when there are so many listen sockets?