httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <p...@c2.net>
Subject RE: [PATCH] windows.html - details details
Date Wed, 17 Jun 1998 12:04:35 GMT
On Tue, 16 Jun 1998, Dale Couch wrote:
> > >My only interest here was to automate the testing
> > >of the NT and currently I can't kill the server
> > >(I was delusional yesterday when I said I could).
> >
> > One way to certainly kill it is to install it as a service and either
> > use the GUI Services app (in the Control Panel) or the rather
> > obscure command line:
> >
> > net start (or stop) Apache
> 
> Not to contradict, at least for me as a Windows User, this does not work.
> It appears that when Apache starts it warms up, and then spans 1 new child.
> The parent then exits.  This is a problem for the service manager because

This should not happen. If it does it is a bug. Is there anything in the
error.log?

What should happen is:

  1 Apache starts, reads the config files
  2 Apache spawns a child, it reads the config files, gets a mutex,
    creates some threads, starts processing requests
  3 Apache now waits for a signal from one its child
  4 If parent gets a signal from the child (i.e. child dies), parent
    goes back to step 2.

The use of a child like this makes Apache very resilient to serious
failures in (say) ISAPI or Apache modules, since the parent will create a
replacement child if the old child dies for any reason. 

If a graceful restart happens, the parent gets a restart signal at point
3, creates a new child (this is the restart bit), then signals the old
child to die. The new child will block waiting for the mutex until the old
way has finished up its current requests. (So the parent can, for some
period of time, have more than one child). 

But there should always be one child and one parent. 

On NT, when started from the service manager, the service manager's
control thread is in the parent process. 

> I would like to know if there is any way to get apache to just start and not
> spawn a new child, thereby keeping its pid, so that you can use the service
> manager to control the service.  

Use the -X command line option. But that is intended to be a debugging
aid, not used for a real service. 

Paul


Mime
View raw message