The netstat console utility shows that some CloudFlare connections are in CLOSE_WAIT state. Indicating that the server is just sitting without properly closing connections. Looking at the TCP traffic of my web server with Message Analyzer, I found several connections that were established and an HTTP request was sent, but which was never processed by my server.
So, we get the answer: the number of simultaneously established connections exceeds the number of available Accept () calls. So the TCP stack connects and waits while the application processes this connection. Depending on the situation, this can never happen, so the client side simply disconnects this connection after a timeout of 30 seconds without receiving a response.
To fix this, you must increase the number of possible tricks . This parameter can be called "Maximum number of simultaneous connections" or something similar. Check your web server documentation \ contact support to find out.
In addition, as an experiment, you can make the server respond to the โConnection: closeโ header for each request. This can prevent you from reaching the restrictions on active connections, because CloudFlare has been keeping them for too long.
In addition, the more concurrent requests you make, the more likely you are to get into trouble. You can try setting a small timeout on the server side for downtime.
PS: Illustration of CloudFlare connection number after one client has loaded the page: ( http://i.imgur.com/IgwGLCf.png )
source share