Bug 60598

Summary: Graceful restart do not follow changes in MaxRequestWorkers mpm_prefork
Product: Apache httpd-2 Reporter: Emilio <bistrulli>
Component: mpm_preforkAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal CC: bistrulli, szg0000
Priority: P2    
Version: 2.4.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Emilio 2017-01-17 17:41:07 UTC
With multiple graceful restarts apache do not spawn the specified number of processes as indicated by the mpm_prefork MaxRequestWorkers parameter.

To reproduce the bug take the following steps:

1) start apache with following mpm_prefork.conf file
<IfModule mpm_prefork_module>
        MaxRequestWorkers   6
        MaxRequestsPerChild 0
</IfModule>

then the 6 children processes are spawned as expected

2) change the mpm_prefork.conf and restart apache gracefully 
(sudo apache2ctl -k graceful)
<IfModule mpm_prefork_module>
        MaxRequestWorkers   2
        MaxRequestsPerChild 0
</IfModule>

the number of children process is reduced to 2 as expected

3) change the mpm_prefork.conf and restart apache gracefully
(sudo apache2ctl -k graceful)
<IfModule mpm_prefork_module>
        MaxRequestWorkers   6
        MaxRequestsPerChild 0
</IfModule>

the number of children processes still remain fixed to 2 (observed with (heavy/soft/zero) load on the server). Generally what we saw is that this behavior happens after a chain of graceful restart when MaxRequestWorkers is  decreased then increased.