|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-06 01:49 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 05:00:01 2025 UTC |
Description: ------------ As stated in the summary, I'm running PHP in FastCGI mode with Apache 2.0.49 and mod_fastcgi 2.4.2. After upgrading from PHP 4.3.5 to PHP 4.3.6 I noticed that a lot more PHP CGIs were running on the server. Before it were 10, afterwards it were 79. It seems to me that instead of starting the specified amount of PHP CGIs per active Apache server (5, see code below) with PHP 4.3.6 it will start the specified number of CGI provcesses for every instance (child process) of the Apache server. Compile settings for PHP 4.3.5 and 4.3.6: ./configure \ --disable-ipv6 \ --enable-calendar \ --enable-ftp \ --enable-force-cgi-redirect \ --enable-magic-quotes \ --enable-mbstring \ --enable-mbregex \ --enable-memory-limit \ --enable-mime-magic \ --enable-sigchild \ --with-bz2 \ --with-config-file-path=/etc \ --with-curl \ --with-db4 \ --with-freetype-dir \ --with-gd \ --with-gettext \ --with-jpeg-dir \ --with-mcrypt \ --with-mhash \ --with-mysql=/usr \ --with-openssl \ --with-png-dir \ --with-t1lib \ --with-tiff-dir \ --with-xmlrpc \ --with-zlib \ --enable-fastcgi Integration in Apache: <IfModule mod_fastcgi.c> ScriptAlias /fcgi-bin/ /opt/apache/fcgi/ <Location /fcgi-bin/> Options ExecCGI SetHandler fastcgi-script </Location> # Alias /fcgi-bin/ /opt/apache/fcgi/ FastCgiServer /opt/apache/fcgi/php-fcgi -processes 5 AddType application/x-httpd-php .php Action application/x-httpd-php /fcgi-bin/php-fcgi </IfModule> The CGI version of PHP is copied to /opt/apache/fcgi using cp sapi/cgi/php /opt/apache/fcgi/php-fcgi Expected result: ---------------- With PHP 4.3.5, evaluating the running processes will show a reasonable small number: linux:~/soft/php-4.3.5 # ps ax | grep php-fcgi | wc -l 7 linux:~/soft/php-4.3.5 # ps ax | grep httpd2 | wc -l 32 linux:~/soft/php-4.3.5 # Actual result: -------------- With PHP 4.3.6 the same command shows a lot more running PHP CGIs: linux:~/soft/php-4.3.6 # ps ax | grep php-fcgi | wc -l 47 linux:~/soft/php-4.3.6 # ps ax | grep httpd2 | wc -l 32 linux:~/soft/php-4.3.6 #