Optimal Apache Settings for PHP?
| From: | Wong Chin Shin | Date: | Tue, 29 Aug 2000 21:47:52 +0000 |
| Subject: | Optimal Apache Settings for PHP? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-14245@lists.php.net to get a copy of this message | ||
Hi,
I was reading Gerhard Mourani's Linux Optimization book and it advises the
following Apache configuration optimizations (among other) :
MaxKeepAliveRequests 0 # unlimited
MaxRequestsPerChild 10000
which I intepret to mean basically "let everybody in, we'll get round to ur
table eventually."
While this might be good for static HTML pages which doesn't take up much
CPU, I'm wondering if it's advisable for a PHP enabled site. Every PHP
document called might have quite a few calculations or data churning in it.
This would translate to having a longer time for each PHP document to be
processed. Even worse is when you call a DB server eg mysql. When I set up
my Apache server according to the recommendations in the book, whenever the
mysql server locks up or dies, httpd will just keep on queueing up the
incoming process while the current processes are waiting to be timed out.
Which can be pretty heavy on the server resources and might even lead to it
hanging.
Is there anybody with any suggestions on good parameters for configuring
Apache to work with PHP and a database? Would appreciate it a lot...
Thanks
Wong