Edit report at http://bugs.php.net/bug.php?id=52569&edit=1
ID: 52569 Comment by: f...@php.net Reported by: mplomer at gmx dot de Summary: Implement "ondemand" process-manager (to allow zero children) Status: Analyzed Type: Feature/Change Request Package: FPM related PHP Version: 5.3.3 Assigned To: fat Block user comment: N New Comment: For information, the listen.backlog default value has been changed from -1 to 128 into trunk recentely: http://svn.php.net/viewvc? view=revision&revision=302725 This changed won't be applied to 5.3 branch so as the ondemand process manager as it's a (big ?) new feature. It could be discussed. I like the listen_backlog adjustment. It was maybe not perfect but setting it to 0 will make the on demand PM not working. for the "else if" fix, you have to add an "else {}" in all the cases. If there is a bug somewhere else, it's not advised to have a case which could not be checked. it looks great. Can you also provides test results ? thx a LOT for you help and your time making PHP better. Previous Comments: ------------------------------------------------------------------------ [2010-08-26 00:15:47] mplomer at gmx dot de I did some finetuning and cleanups in the fpm-ondemand-pm-v3.patch: set listen_backlog default to 128 (to be discussed?) removed listen_backlog adjustment (I considered that it is enough to leave the default at 128, a greater value is mostly ignored by the system anyway, and the number of requests in the backlog has rather nothing to do with max_children. If you do not agree with this, feel free to restore the old behaviour :-) ) renamed ondemand_process_timeout to process_idle_timeout (it's better, I think) fixed "else if (wp->config->pm == PM_STYLE_ONDEMAND)" in fpm_conf.c (was only "else" before) removed config->pm_(start/min_spare/max_spare)_servers = 0; ... in fpm_conf.c (should not be used anyway when pm = ondemand) log libevent version in fpm_event_init_main updated some comments in sample config ------------------------------------------------------------------------ [2010-08-24 00:54:04] f...@php.net I did some adjustements. I've added two configuration directives: ; The minimum delay (in µs) between two consecutive forks. ; Note: Used only when pm is set to 'ondemand' ; Default Value: 100µs ;pm.min_delay_between_fork = 100 ; The number of seconds after which an idle process will be killed. ; Note: Used only when pm is set to 'ondemand' ; Default Value: 10s ;pm.ondemand_process_timeout = 10s; Moreover, I've added a check on the listen.backlog directive which has to be greater than pm.max_children when the 'ondemand' PM is used. If the backlog queue is smaller than pm.max_children the libevent can't detect incoming connections. ------------------------------------------------------------------------ [2010-08-24 00:51:25] f...@php.net The following patch has been added/updated: Patch Name: fpm-ondemand.v2.patch.txt Revision: 1282603885 URL: http://bugs.php.net/patch-display.php?bug=52569&patch=fpm-ondemand.v2.patch.txt&revision=1282603885 ------------------------------------------------------------------------ [2010-08-10 19:59:55] mplomer at gmx dot de Thanks. Now it's clear, why setting start_servers = 0 does not work :-) First of all, I updated the appended patch to work with PHP 5.3 branch (see attachment). The first tests work very well. I'll do some more tests the next days. ------------------------------------------------------------------------ [2010-08-09 22:14:10] f...@php.net The following patch has been added/updated: Patch Name: fpm-ondemand-pm Revision: 1281384850 URL: http://bugs.php.net/patch-display.php?bug=52569&patch=fpm-ondemand-pm&revision=1281384850 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52569 -- Edit this bug report at http://bugs.php.net/bug.php?id=52569&edit=1