This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Apache/cygwin shutdown problem


THIS IS OFF-TOPIC for cygwin-apps.  Apache is not part of the standard
installation, and, at this rate, I very much doubt that it ever will be.

This is the last time I'll mention this.  Next time I'll just block any
further email.

That includes apologies, incriminations, profession of confusion about
why this is off-topic, and personal slams.  None of it belongs here.

In other words, this is the last message in this thread.

If you want to discuss apache or talk about how mean I am, send email to
cygwin@cygwin.com.

For further details, contact Bobby McNulty.

cgf

On Mon, Dec 31, 2001 at 01:21:56PM +0100, Stipe Tolj wrote:
>Hi Sami,
>
>> I've been using Apache 1.3.20 and 1.3.22 which I've compiled myself
>> under Cygwin and been quite happy with them. Recently, however, there's
>> been this problem that is quite irritating:
>> 
>> I cannot shut down Apache. When I do 'apachectl stop', one of the httpd
>> processes turns into '<defunct>' but that is all. All of the other httpd
>> processes hang there. In the error_log it says:
>> 
>> [Mon Dec 31 02:41:37 2001] [warn] child process 1568 still did not exit,
>> ending a SIGTERM
>> [Mon Dec 31 02:41:37 2001] [warn] child process 1668 still did not exit,
>> ending a SIGTERM
>> [Mon Dec 31 02:41:41 2001] [error] child process 1568 still did not
>> exit, sending a SIGKILL
>> [Mon Dec 31 02:41:41 2001] [error] child process 1668 still did not
>> exit, sending a SIGKILL
>> [Mon Dec 31 02:41:43 2001] [error] could not make child process 1568
>> exit, attempting to continue anyway
>> [Mon Dec 31 02:41:43 2001] [error] could not make child process 1668
>> exit, attempting to continue anyway
>> [Mon Dec 31 02:41:43 2001] [info] removed PID file /www/logs/httpd.pid
>> (pid=1732)
>> [Mon Dec 31 02:41:43 2001] [notice] caught SIGTERM, shutting down
>
>yes, that effect is known to me. It seems Cygwin has problems with
>signal passing under high loaded or long-running processes.
>
>Usually Apache will try to use SIGUSR signal to gracefully shutdown
>the childs, if this fails for some defined timeout, the parent process
>(`cat <path>/logs/httpd.pid`) will send "stronger" singnals, so
>SIGTERM and SIGKILL are send, which then should shutdown the child
>processes. 
>
>It takes some seconds to perform this, so that's why a "apachectl
>restart" usually fails, because it does not check if the processes
>have gone away before "starting" again.
>
>Usually it is eneough to 
>
> $ kill -TERM `cat <path>/logs/httpd.pid`
>
>to stop all processes, which is in fact the same thing "apachectl
>stop" does.
>
>> Usually I can kill the httpd processes using Windows 2000 Task Manager.
>> Sometimes Task Manager just says "Access denied" and the process just
>> hangs there. The only way I've managed to get rid of the hanging process
>> is to reboot.
>
>I have never experienced that kind of trouble with the task manager,
>at least not with the apache 1.3 branch which uses prefork to scale.
>
>Only the new 2.0 branch with worker mpm, which uses pthreads for
>Cygwin has "stopped" my machine (Win2k WS) one time, so that I even
>could not call the ctrl-alt-del screen.
>
>> I'm developing an Apache module so I'm doing a lot of starting and
>> stopping of Apache.
>
>What about doing
>
>  $ kill -HUP `cat <path>/logs/httpd.pid`
>
>which will reload the configuguration and restart gracefully? Wouldn't
>that help?
>
>> I'm fairly certain Apache behaviour changed when I upgraded Cygwin.dll
>> from 1.3.5 to 1.3.6, so it seems like a Cygwin problem. I'm just
>> emailing you first to ask if you have seen this same problem or heard of
>> anyone else having the same problem?
>
>That would be interesting to the Cygwin developer folks, so I'll CC to
>them. Chris, Robert are you having noticed that yet?
>
>To be honoust I'm running Cygwin 1.3.5 and not yet 1.3.6, so I can not
>confirm that effect, but as I have stated in a couple of posting
>regarding Apache's "hanging effect in keep-alive mode" this seems to
>be Cygwin specific.
>
>> The problem is quite easy to replicate:
>> 
>> /www/bin/apachectl start
>> /www/bin/apachectl stop
>> 
>> And the httpd processes just won't die.
>
>have you waited for a couple of seconds, let say 20-30 sec. to see if
>they die? Sometimes it takes some time...
>
>> I've compiled Apache 1.3.22 like this:
>> ./configure --prefix=/www
>> make
>> make install
>
>which means you have build a static version, that should be working
>fine.
>
>> Another question: I tried to compile a version of Apache where I can use
>> LoadModule to load DLLs but failed to build it. The cygwin.html file in
>> the manual says you need a patched ld.exe. Is that information still valid?
>
>No, the patched ld.exe was required before we had offficial
>--auto-load support in binutils's ld. That is obsolet for Cygwin 1.3.6
>and up. -- Thanks for the reminder, I will update this in the Apache
>for Cygwin docs for the next 1.3 branch release.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]