Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 21 Nov 2003 11:51:01 +0000
From: Robert Watkins <rwatkins AT foo-bar DOT org>
X-X-Sender: rwatkins AT JohnDrake
To: cygwin AT cygwin DOT com
Subject: xinetd and httpd
Message-ID: <Pine.CYG.4.58.0311211134410.996@JohnDrake>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

My goal is to have Apache start up when my machine boots. Using cygrunsrv,
I've set init up as an NT service (on Win2K) so that part is fine.

At first I wrote my own httpd startup script and put it into /etc/rc.d/init.d
but this frequently led to an httpd.exe.stackdump, so next I enabled the
httpd startup using xinetd. The oddity here is that the very first request
to Apache hangs (while in the background I can see that the httpd processes
have started). If I stop this request, and make another -- for the same
target page -- the page loads fine and all is right from there. If, after
the first request hangs, I stop this first request and make another -- but
this time for a different target page -- it is as if it is the very first
request and another set of httpd processes starts (one with a PPID of 1, the
others being children of this one).

/var/log/servicelog shows only the initial request, with the duration being
how long I've waited until stopping it:

  03/11/21 AT 11:30:02: START: httpd pid=3464 from=192.168.56.9
  03/11/21 AT 11:30:06: EXIT: httpd pid=3464 duration=4(sec)

What am I doing wrong? Below are xinetd.conf and xinetd.d/http.

Thanks,
-- Robert

--------------------
Robert Watkins
rwatkins AT bar-foo DOT org
--------------------

----- /etc/xinetd.conf -----
defaults
{
        instances       = 60
        log_type        = FILE /var/log/servicelog
        log_on_success  = HOST PID
        log_on_failure  = HOST
        cps             = 25 30
}

includedir /etc/xinetd.d

----- /etc/xinetd.d/httpd -----
service httpd
{
        socket_type     = stream
        wait            = no
        server          = /usr/local/sbin/httpd
        log_on_success  += DURATION USERID
        log_on_failure  += USERID
        nice            = 10
        user            = rwatkins
        disable         = no
}

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/