The default php-cgi-fastcgi build have backlog value of 128, what causes the high-load fastcgi setups to fail with "Connection timed out" or "Upstream has closed connection" or such (no new connections accepted). Reproducible: Always Steps to Reproduce: Make the high-load web server with connection rate higher than 128 (also the kernel sysctl.somaxconn must be tuned). Actual Results: The connections sometimes drops since backlog overloaded. Expected Results: The connections are accepted. The upstream won't accept this patch since with php 5.4 the php-fpm code will go upstream, there the tuning of backlog feature included. But everyone wanna run high-load servers now, not waiting till 5.4 goes out :)
Created attachment 226119 [details, diff] Patch adding ability to control the size of php-fastcgi backlog Patch adds ability to control the size of the backlog via system variable, eg: `export PHP_FCGI_LISTEN_BACKLOG=1024`. When no such variable set the default 128 is used.
We're planning to include this patch.
... include this patch in php-5.3, that is.
Doesn't look like this patch made it into our 5.3 ebuild after all. However, PHP-FPM is now in php-5.3.3 RC1, which can be found in the php overlay.
Sorry this was "fixed" by a timeout on our side. I'll close the bug once php-5.3.3 gets released and included in our tree. Shouldn't be too long anymore. If you're curious just try the overlay Ole mentioned (layman -a php)
PHP 5.3.3 released and even stable on amd64 and x86. Closing now