I frequently get this error on random pages when the are like ~+10K connections (netstat -an |grep 80 |wc -l). This happens while there is still +10GB of free memory and server load is less than 3.
My relevant configs:
memory_limit = 1024M default_socket_timeout = 120
pm = dynamic pm.max_children = 30 pm.start_servers = 5 pm.min_spare_servers = 2 pm.max_spare_servers = 5 ;pm.max_requests =20000 #uncommented with any value didn't fixed request_terminate_timeout = 120s
I also doubled the above vlues (i.e 60 children, 10 start, 10 max servers) with no avail.
worker_connections 4024; keepalive_timeout 10;
Nginx itself behind Varnish and memcached is enable. page rendering is pretty fast in general.
This seems to be a quite common problem you I could not find any helpful solution or even analysis of the possible causes. So your hints/solutions are greatly appreciated.