Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312621 - dev-lang/php: ability to tune php-fastcgi backlog value for high-load servers.
Summary: dev-lang/php: ability to tune php-fastcgi backlog value for high-load servers.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2010-04-01 13:47 UTC by BigBug
Modified: 2010-10-24 11:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch adding ability to control the size of php-fastcgi backlog (listen-backlog-env-var.patch,503 bytes, patch)
2010-04-01 13:52 UTC, BigBug
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BigBug 2010-04-01 13:47:02 UTC
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 :)
Comment 1 BigBug 2010-04-01 13:52:00 UTC
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.
Comment 2 Christian Hoffmann (RETIRED) gentoo-dev 2010-04-11 15:13:40 UTC
We're planning to include this patch.
Comment 3 Christian Hoffmann (RETIRED) gentoo-dev 2010-04-11 15:15:23 UTC
... include this patch in php-5.3, that is.
Comment 4 Ole Markus With (RETIRED) gentoo-dev 2010-06-21 19:33:37 UTC
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.
Comment 5 Matti Bickel (RETIRED) gentoo-dev 2010-07-05 22:16:25 UTC
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)
Comment 6 Ole Markus With (RETIRED) gentoo-dev 2010-10-24 11:31:32 UTC
PHP 5.3.3 released and even stable on amd64 and x86. Closing now