Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 May 2007 11:56:17 +0200
From:      Olaf Greve <o.greve@axis.nl>
To:        Ivan Voras <ivoras@fer.hr>, Dan Nelson <dnelson@allantgroup.com>
Cc:        freebsd-questions@freebsd.org, freebsd-amd64@freebsd.org
Subject:   Re: How to make Apache (2.2.4) less greedy, or Sendmail less polite?
Message-ID:  <8DDF332E-A03A-44DC-A87B-D64EC6B91E5A@axis.nl>
In-Reply-To: <f1eu0a$3h5$1@sea.gmane.org>
References:  <2BEB30C2-C9C5-43AB-9DCA-5C9A1B0AC2C0@axis.nl> <f1eu0a$3h5$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Ivan and Dan (and the lists),

 >The size of apache processes is telling me you're using PHP or some  
other heavy apache module.

Indeed I am (I forgot to mention this). It is PHP 4.4.6, and it is  
set up as an Apache module.

 > If so, you can switch to using PHP as FastCGI responder via  
mod_fcgid. The benefits are that you'll get only a few number of
 > large php-cgi processes (configurable, usually around 10), and the  
rest will be lighter httpd processes for serving static
 > content.

Will that not have some other downsides? I remember that previously  
when running PHP on the CGI, that e.g. a lot of debugging power got  
lost, as each and every error would simply either return a blank  
page, or simply an "internal servor error 500" or so.... Is that also  
the case with FastCGI?

 >BUT, if something else changed when you switched to the new apache  
(e.g. PHP version, your web applications), it may not be
 >apache's fault.

The PHP version got upgraded from 4.4.0 to 4.4.6 too, but none of the  
actual application scripts changed.

BTW: At times what one sees happening is that 2 of the httpd daemons  
quickly go up to (each, or in turn) about 50% (or 70% if it can grab  
that much), then stays quite a while at that, and then goes back to a  
more reasonable amount.
At other times, there are around 10+ httpd processes that each  
consume around 5% of the CPU, with a lot more of them using around  
0-1% of the CPU (perhaps defunct already?). Dunno. Apache + PHP is  
lightning fast, but... at the expense of the CPU being pulled close  
to 100% all to easily...

Then, regarding Dan's sendmail configuration suggestion: tnx! I just  
put that in place and will monitor sendmail's behaviour today, to see  
how it performs during heavy server load.

I'll let you guys know how I get on with this...

Meanwhile: I'm still open for suggestions as to how to best make  
Apache behave less selfishly.

Cheers!
Olafo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8DDF332E-A03A-44DC-A87B-D64EC6B91E5A>