Bug 751148 - ThreadLimit directive ignored if declared in wrong order
Summary: ThreadLimit directive ignored if declared in wrong order
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd
Version: 5.6
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Joe Orton
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 799257
TreeView+ depends on / blocked
 
Reported: 2011-11-03 16:52 UTC by Rafael Soares (Tuelho)
Modified: 2012-05-10 15:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 799257 (view as bug list)
Environment:
Last Closed: 2012-05-10 15:15:12 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Rafael Soares (Tuelho) 2011-11-03 16:52:56 UTC
Description of problem:
It seems when you use the MPM Worker module directives in a specific order (inside conf/httpd.conf) the Httpd ignores the ThreadLimit directive. Thus the httpd falls back the ThreadLimit to a default value (64).

Version-Release number of selected component (if applicable):
Apache Httpd 

How reproducible:


Steps to Reproduce:
1. edit the conf/httpd.conf
2. change the MPM Worker module directives to something like this (the important here is the directive order)

# Wrong order
ServerLimit         20
StartServers        8
MinSpareThreads     5
MaxSpareThreads     20
ThreadsPerChild     120
MaxClients          1200
MaxRequestsPerChild 0
ThreadLimit         120
ThreadStackSize     10240

3. restart the httpd service
  
Actual results:
[root@vm123 conf.d]# /etc/init.d/httpd restart
Parando o httpd:                                           [  OK  ]
Iniciando httpd: WARNING: ThreadsPerChild of 120 exceeds ThreadLimit value of 64
threads, lowering ThreadsPerChild to 64. To increase, please see the
 ThreadLimit directive.
WARNING: MaxClients (1200) is not an integer multiple
 of ThreadsPerChild (64), lowering MaxClients to 1152
 for a maximum of 18 child processes,
                                                           [  OK  ]


Expected results:
ThreadLimit directive be recognized in any order it appears.

Additional info:
If you just put the 'ThreadLimit' before 'ThreadsPerchild' the Apache Httpd works fine.

e.g

# Correct order
ServerLimit         20
StartServers        8
MinSpareThreads     5
MaxSpareThreads     20
ThreadLimit         120
ThreadsPerChild     120
MaxClients          1200
MaxRequestsPerChild 0
ThreadStackSize     10240

I've found a thread [1] discussing this issue in a Debian forum.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495656

Comment 3 RHEL Program Management 2012-04-19 11:51:21 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 6 Joe Orton 2012-05-10 15:02:59 UTC
This is a known defect in the 2.2 config handling which has been fixed in 2.4 upstream, so will get solved up in a future release of RHEL.  The patch is very invasive, and since the problem is relatively trivial to work around, we don't plan to backport it.

Comment 7 RHEL Program Management 2012-05-10 15:15:12 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.


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