Bug 98545

Summary: Handle errors when starting piped logged processes
Product: [Retired] Red Hat Linux Reporter: Oliver Graf <oliver>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-09-04 07:40:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/etc/httpd/conf/httpd.conf
none
One of the virtual host files which are included by /etc/httpd/conf/virtual.conf (see last line of httpd.conf) none

Description Oliver Graf 2003-07-03 14:56:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
After changing from SuSE 6.0 (sic!) to Red Hat 9 which included a migration 
from Apache 1.3.11 to 2.0.40, I now recognize Apache spawning many many 
processes (up to about 180). This takes a few hours (3 or 4), and Apache is 
then unable to serve pages any more.

While migrating my old httpd.conf I kept the original Red Hat httpd.conf and 
added my virtual host directives (58 virtual hosts).

My current workaround is a cron job which is run every 5 minutes and which 
counts the number of httpd processes. If there are more than 100, it 
runs "/etc/init.d/httpd restart".

Version-Release number of selected component (if applicable):
httpd-2.0.40-21.3

How reproducible:
Always

Steps to Reproduce:
1. Simply start Apache!
2.
3.
    

Additional info:

Comment 1 Oliver Graf 2003-07-03 14:59:03 UTC
Created attachment 92737 [details]
/etc/httpd/conf/httpd.conf

Comment 2 Oliver Graf 2003-07-03 14:59:55 UTC
Created attachment 92738 [details]
One of the virtual host files which are included by /etc/httpd/conf/virtual.conf (see last line of httpd.conf)

Comment 3 Joe Orton 2003-07-07 08:47:35 UTC
You have "MaxClients" set to 150, so I'd expect a maximum of 150 processes to be
spawned if your server is under load.   If you want to have a maximum of 100
processes, use

  MaxClients 100

in the prefork.c section.

Comment 4 Oliver Graf 2003-07-09 07:07:07 UTC
Indeed, there will be only 100 processes. But the same happens again: When 
Apache reaches 100 processes, it is unable to serve pages. I reduced MaxServers 
to 50, and Apache hangs when it reaches 50 processes.

Comment 5 Joe Orton 2003-07-09 09:00:52 UTC
Ah, can you try changing in your virtual.conf (and anywhere else you are using
rotatelogs) from:

    TransferLog "|rotatelogs 
to
    TransferLog "|/usr/sbin/rotatelogs 

there is a bug in the error handling when a piped logs process fails to start up.

(if you're migrating an httpd.conf from 1.3 you should also read through the
migration guide at /usr/share/doc/httpd-2.0.40/migration.html)


Comment 6 Oliver Graf 2003-07-10 14:49:00 UTC
That's it! Thanks a lot. You can close this bug.

Comment 7 Joe Orton 2003-07-10 15:14:20 UTC
OK, great.  I'm going to leave this bug open to track the fact that this config
error was not clearly diagnosed when it should have been, so that can be fixed
in a future erratum.  Thanks for the report.

Comment 8 Mark J. Cox 2003-09-04 07:40:27 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2003-240.html