Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1339514 - [devexp_public_881]Perl image StartServers and MaxRequestWorkers don't work well
Summary: [devexp_public_881]Perl image StartServers and MaxRequestWorkers don't work well
Alias: None
Product: OKD
Classification: Red Hat
Component: Image
Version: 3.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Wang Haoran
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-25 08:29 UTC by Wang Haoran
Modified: 2016-09-19 13:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-09-19 13:49:31 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Wang Haoran 2016-05-25 08:29:35 UTC
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:

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 
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

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:

Comment 1 Martin Nagy 2016-05-26 11:01:14 UTC
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.

Comment 2 Martin Nagy 2016-05-26 11:12:20 UTC
I'm going to remove the IfModule check, since Prefork is always used anyway.

Comment 3 Martin Nagy 2016-05-26 14:01:42 UTC
PR here: https://github.com/openshift/s2i-perl/pull/87

Comment 4 Martin Nagy 2016-05-29 20:21:55 UTC
PR was merged

Comment 5 Wang Haoran 2016-05-30 05:15:41 UTC
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

Note You need to log in before you can comment on or make changes to this bug.