Description of problem: After we define env vars HTTPD_START_SERVERS and HTTPD_MAX_REQUEST_WORKERS in the dc ,the Perl image httpd configuration StartServers and MaxRequestWorkers have correctly set , but seems the configuration is not used. Version-Release number of selected component (if applicable): [root@ip-172-18-9-155 ~]# openshift version openshift v1.3.0-alpha.0-674-gc12d753 kubernetes v1.3.0-alpha.1-331-g0522e63 etcd 2.3.0 [root@ip-172-18-3-62 ~]# docker images |grep per ci.dev.openshift.redhat.com:5000/rhscl/perl-520-rhel7 latest 216634cf7e6f 6 days ago 506.1 MB ci.dev.openshift.redhat.com:5000/openshift/perl-516-rhel7 latest f44ae17768e5 6 days ago 502.1 MB How reproducible: always Steps to Reproduce: 1.create a app using perl image $oc new-app openshift/perl:5.16~https://github.com/openshift/dancer-ex 2.update the dc env $oc env dc dancer-ex -e HTTPD_MAX_REQUEST_WORKERS=10 -e HTTPD_START_SERVERS=1 3. check the httpd configuration and httpd process no after startup. 4. use ab send request with 100 concurrency and check the worker processes $ab -c 100 -n 10000 http://<service_ip>:8080/ in another terminal: $while true; do echo $( ps -ef |grep httpd |grep -v grep |wc -l); sleep 1; done Actual results: step 3:the httpd process no is 6,congiration file: root@ip-172-18-3-62 ~]# oc rsh dancer-ex-6-5gy04 sh-4.2$ cat /opt/app-root/etc/httpd.d/50-mpm.conf <IfModule mpm_prefork_module> # This value should mirror what is set in MinSpareServers. StartServers 1 MinSpareServers 1 MaxSpareServers 11 # The MaxRequestWorkers directive sets the limit on the number of # simultaneous requests that will be served. # The default value, when no cgroup limits are set is 256. MaxRequestWorkers 10 ServerLimit 10 MaxConnectionsPerChild 4000 MaxKeepAliveRequests 100 </IfModule> step 4:the httpd process no is 100 not the max worker NO. 10 Expected results: httpd process no should have same NO. with the configuration after startup Additional info:
Seems like the problem is that we use -C to pass our custom configuration, which reads that config *before* reading the rest. I think that's the reason why IfModule option fails, because mpm_prefork_module is not loaded at the time. So we can either change that to -c, or remove the IfModule stuff. Hmm.
I'm going to remove the IfModule check, since Prefork is always used anyway.
PR here: https://github.com/openshift/s2i-perl/pull/87
PR was merged
verified with images: ci.dev.openshift.redhat.com:5000/rhscl/perl-520-rhel7 latest 5666235ab0e4 2 days ago 506.1 MB ci.dev.openshift.redhat.com:5000/openshift/perl-516-rhel7 latest 54ba1355c132 2 days ago 502.1 MB