Bug 60598 - Graceful restart do not follow changes in MaxRequestWorkers mpm_prefork
Summary: Graceful restart do not follow changes in MaxRequestWorkers mpm_prefork
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mpm_prefork (show other bugs)
Version: 2.4.7
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-17 17:41 UTC by bistrulli
Modified: 2017-03-02 11:23 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bistrulli 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.