fat Sun, 17 Jul 2011 14:28:31 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=313326
Log:
fix revision r313323
Changed paths:
U php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm.h
U php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_children.c
U php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c
Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm.h
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm.h 2011-07-17 14:06:05 UTC
(rev 313325)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm.h 2011-07-17 14:28:31 UTC
(rev 313326)
@@ -24,7 +24,6 @@
int max_requests; /* for this child */
int is_child;
int test_successful;
- int process_max; /* global */
};
extern struct fpm_globals_s fpm_globals;
Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_children.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_children.c 2011-07-17
14:06:05 UTC (rev 313325)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_children.c 2011-07-17
14:28:31 UTC (rev 313326)
@@ -375,7 +375,14 @@
max = wp->config->pm_max_children;
}
- while (fpm_pctl_can_spawn_children() && wp->running_children < max &&
fpm_globals.running_children < fpm_global_config.process_max) {
+ /*
+ * fork children while:
+ * - fpm_pctl_can_spawn_children : FPM is running in a NORMAL state
(aka not restart, stop or reload)
+ * - wp->running_children < max : there is less than the max process
for the current pool
+ * - (fpm_global_config.process_max < 1 ||
fpm_globals.running_children < fpm_global_config.process_max):
+ * if fpm_global_config.process_max is set, FPM has not fork this
number of processes (globaly)
+ */
+ while (fpm_pctl_can_spawn_children() && wp->running_children < max &&
(fpm_global_config.process_max < 1 || fpm_globals.running_children <
fpm_global_config.process_max)) {
warned = 0;
child = fpm_resources_prepare(wp);
@@ -410,7 +417,7 @@
}
- if (!warned && fpm_globals.running_children >=
fpm_global_config.process_max) {
+ if (!warned && fpm_global_config.process_max > 0 &&
fpm_globals.running_children >= fpm_global_config.process_max) {
warned = 1;
zlog(ZLOG_WARNING, "The maximum number of processes has been
reached. Please review your configuration and consider raising 'process.max'");
}
Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c 2011-07-17
14:06:05 UTC (rev 313325)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c 2011-07-17
14:28:31 UTC (rev 313326)
@@ -1020,7 +1020,6 @@
zlog(ZLOG_ERROR, "process_max can't be negative");
return -1;
}
- fpm_globals.process_max = fpm_global_config.process_max;
if (!fpm_global_config.error_log) {
fpm_global_config.error_log = strdup("log/php-fpm.log");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php