There are Windows Server 2016, it has a web-application installed on apache + mod_fcgid + php-cgi + postgresql.The application is intended for employee certification and soon it is planned to conduct mass certification, more than 50k people.I wrote a small application that emulates user behavior( browser) to conduct a test load and check with how many simultaneous testers the server will cope with.The specs is that users will have access to the application on a schedule and a surge of simultaneous requests to start the test is possible.So here set up my program so that it emulates the test start situation 10 times at a time every second and after 3–3.5 thousand connect starts the application crashes with error #10061(WSAECONNREFUSED).It’s not a timeout, but an active connection interruption.Do I understand correctly that because of the load, the apache thread, which should make accept, simply does not have time to work out all the connections, and after the queue of such “nedokonects” overflows, they start flying off with a failure?
In apache, 350 threads are configured, and in mod_fcgid up to 30 php-cgi processes.These are the most optimal settings chosen experimentally.Reducing and increasing them leads to the fact that connections start to fight back at earlier stages.I found the backlog setting in apache, but that nothing changes from the changes of this number.I don’t understand where I need to dig.What can be done to enable the server to survive this short-term burst of simultaneous connections?
Description