On 02/05/2008 3:40:50 PM +0100, Andre Hübner <[EMAIL PROTECTED]> wrote:
> no nonsens ;)
> 
> i want to start a defined numbers of apps to hold in backhand by config of 
> module, not by wgeting around...
> lets say 3-4 apps of two differnet php-cgi would be enough.
> apache in mod_prefork has same procedure with 
> MinSpareServers/MaxSpareServers...

And how is this related to the number of virtualhosts you have ?
Don't forget that even if you are using fastcgi with PHP, mod_fcgid 
originally consider each started fastcgi process as a different one et 
with a different context (php or any other fastcgi-compatible 
application). All these apps have separate 
user/group/environment/virtualhost origin. It means that a php-fastcgi 
process started from virtualhost A will not serve requests from 
virtualhost B, even if it is PHP requests: it will start another PHP 
process. This behavior is expected because virtualhosts don't share the 
same context (e.g. environment set with DefaultInitEnv).

With your configuration, we don't know which PHP process is to start 
(from which virtual host ? what is the defined context for it ?).

Moreover, if you define the DefaultMinClassProcessCount properly and an 
IdleTimeout long enough, once your webserver is started, there will 
always be php processes hanging around, except when you start the 
webserver. But you don't restart your server every minute, do you?

> 
> Sure, PHP needs only 2-3 seconds to start and begin parsing(typical loaded 
> webserver), but this is the time i try to avoid and i have to explain to my 
> users.

Although 2-3 seconds seems very long to just start a PHP process (what 
kind of hardware are you running? Nowadays any 5-years-old Pentium 4 can 
do the job faster than that), there is no difference between starting 
some php processes (same question: what is the context?) with wget or 
internally with a configuration directive: Either way the processes will 
spend time to get started, and your users will keep asking you why.

> In my opinion this would be a way to optimize speed of requests.
> If there is no possibility i have to live with it ;)

If nobody cares about starting these processes automatically, this is 
because when starting your server, you cannot avoid the time needed to 
start the processes, (a couple of seconds for PHP, minutes for 
java-powered engines?). You have then 2 options: your server is loaded, 
then an automatic start of the php process won't help: users will have 
to wait for the server and the fcgi processes to be up. If your server 
is not loaded (e.g. you have less than 1 php query per 2-3 seconds, if 
not, see case #1), using wget or a similar dirty workaround is the best 
way to do so.

Finally, if your goal is to restart your single webserver without your 
users noticing, it's not possible even with a graceful restart, because 
there is always a delay between the old apache threads/children which 
process the last requests then die, and the new ones freshly forked. If 
you really have a critical application which don't tolerate any delay, 
then you'd better go with a load-balancer which takes a server offline 
during the restart phase.

Gabriel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

Reply via email to