fpm_conf.c bug with min_spare_servers

Bug #569927 reported by ahes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PHP-FPM
Incomplete
Undecided
Unassigned

Bug Description

Incorrect check for min_spare_servers in php-fpm svn release causes error message and php-fpm exit with error:
Apr 25 23:17:19.363662 [ALERT] [pool samplepool] start_servers(2) must not be less than min_spare_servers(6) and not greater than max_spare_servers(6)
Apr 25 23:17:19.363690 [ERROR] failed to post process the configuration

When min_spare_servers in configuration is defined to be 1.

Patch:

--- fpm_conf.c 2010-04-25 21:31:15.497572802 +0200
+++ fpm_conf.c.orig 2010-04-25 21:30:21.217569082 +0200
@@ -456,8 +456,8 @@
                        if (config->pm_start_servers <= 0) {
                                config->pm_start_servers = config->pm_min_spare_servers + ((config->pm_max_spare_servers - config->pm_min_spare_servers) / 2);
                                zlog(ZLOG_STUFF, ZLOG_WARNING, "[pool %s] start_servers is not set. It's been set to %d.", wp->config->name, config->pm_start_servers);
- } else if (config->pm_start_servers < config->pm_min_spare_servers || config->pm_start_servers > config->pm_max_spare_servers) {
- zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] start_servers(%d) must not be less than min_spare_servers(%d) and not greater than max_spare_servers(%d)", wp->config->name, config->pm_start_servers, config->pm_min_spare_servers, config->pm_max_spare_servers);
+ } else if (config->pm_start_servers < config->pm_max_spare_servers || config->pm_start_servers > config->pm_max_spare_servers) {
+ zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] start_servers(%d) must not be less than min_spare_servers(%d) and not greater than max_spare_servers(%d)", wp->config->name, config->pm_start_servers, config->pm_max_spare_servers, config->pm_max_spare_servers);
                                return -1;
                        }
                }

Revision history for this message
ahes (marcin-rootnode) wrote :
Revision history for this message
Michael Shadle (mshadle) wrote :

Report this on php.net - that is where the SVN/PHP core version bugs will be tracked now.

Michael Shadle (mshadle)
Changed in php-fpm:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.