Re: Problem with mod_fastcgi and virtual hosts
Michael Smith (mjs@cursci.co.uk)
Mon, 04 Nov 1996 12:52:12 +0000
Message-Id: <327DE6FC.41C86814@cursci.co.uk>
Date: Mon, 04 Nov 1996 12:52:12 +0000
From: Michael Smith <mjs@cursci.co.uk>
To: Stanley Gambarin <gambarin@openmarket.com>
Subject: Re: Problem with mod_fastcgi and virtual hosts
I don't think I explained myself clearly, sorry. I'll try to be more
verbose here!
With a apache running fastCGI, ps gives me something like this:
root 326 1 0 Oct 15 ? 0:06 httpd
web 8885 326 0 12:02:12 ? 0:00 httpd
web 9320 326 0 12:42:14 ? 0:00 httpd
...
web 8891 8885 0 12:02:13 ? 0:03 /perl-fcgi /path/prog.fpl
However when I try this with apache-SSL and fastCGI, I get a ps
something like this:
root 536 1 0 00:13:52 ? 0:00 httpsd
web 531 1 0 00:13:51 ? 0:03 httpsd
web 29322 536 0 12:45:07 ? 0:00 httpsd
web 532 531 0 00:13:51 ? 0:01 /perl-fcgi /path/prog.fpl
ie in the second case, the fastCGI process manages is divorced (ahh)
from the parent. In the first case, kills and restarts work; for
probably obvious reasons, they don't work in the second case.
Hope this is a better explanation!
Mike
Stanley Gambarin wrote:
>
> [Stuff deleted]
> >Now it seems to by and large work - except that when I do a PS, all the
> > fastCGI processes are kids of a process owned by web which has no
> > parent, so kill and restart won't work properly.
> >
> > Another issue is that I have passed the port number to by cgi scripts
> > via --initial-env which is impossible in this instance.
> >
> > Any ideas what is going on?
> >
> > Thanks
> >
> > Michael Smith
>
> The process structure that you have described is the correct one,
> however, you may run into problems with restarting and killing httpd (web)
> process due to Apache's implementation. When main process (web) recieves
> a signal, it sends a SIGTERM to the children. One of the children is the
> FastCGI application manager process (which is a child of web process and
> a parent to all FastCGI apps). The main (web) process then waits 3 seconds
> after which it sends a SIGKILL. So, if the application manager process was
> unable to kill off all of its children (i.e. FastCGI applications), then you
> will have stray FastCGI processes.
>