PHP in CGI mode consumes lot of memory because, for every request a PHP interpreter is called up, so your memory is filled with N php interpreters executing the same PHP code where N is the number of online users. There is no way to avoid it except using some different method like fastcgi/mod_php. FastCgi (also fcgid, its the same thing) is better as compared to mod_php, because it gives more security i.e. the PHP interpreter is not embedded into apache, php interpreter runs separately. The PHP interpreter once started isn't killed by mod_{fastcgi,fcgid} on the end of request as in CGI, but that is configurable. Once a request finishes, the PHP interpreter keeps running, and as soon as another request is received, the running PHP interpreter is used to process the PHP file. So there's no overhead of initiating the process again and again. Also, mod_fcgid (not mod_fastcgi) caches the compiled code in memory, so you don't need opcode caching mechanisms to accelerate PHP performance like (eaccelerator, xcache, etc.) - reduces the memory used by those extensions.
I personally use mod_fcgid on my server and am happy with it. It gives stunning performance.
You should try out mod_fcgid.
sounds good. did some tests with mod_fcgid. cpu-load is higher then using mod_php but not as high as expected.
is this the way how it the big ones do? is it possible to show your config? there is one sentences in the docs which sounds strange ### WarningCurrently, only one FastCGI application of any type (AAA or handler) can be used for a particular request URI. Otherwise, the wrong FastCGI application may be invoked for one or more phases of request processing.
###this means that only on fcgid-script per location is possible? i would like to have .php4 files bind to a php4-wrapper and .php5 files bind to a php5-wrapper in same directory. i did some tests but could not confirm or decline.
Thanks, Hajo --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx