Re: unkillable apache httpd process

From: Dan Nelson <dnelson_at_allantgroup.com>
Date: Wed, 8 Jun 2005 10:42:02 -0500
In the last episode (Jun 08), Jiawei Ye said:
> On 6/8/05, Dan Nelson <dnelson_at_allantgroup.com> wrote:
> > If it's consuming CPU it should be killable.  Tried kill -9?  If it's
> > really threaded, "ps lHp 3794" will print what each kernel thread is
> > doing; maybe only one thread is hung.
>
> kill -9 solves the problem. But the apache2.sh in /usr/local/rc.d
> cannot restart it properly.
>
> root_at_orion:/home/leafy# /usr/local/etc/rc.d/apache2.sh restart
> Performing sanity check on apache2 configuration:
> Syntax OK
> Stopping apache2.
> Waiting for PIDS: 5696, 5696, 5696, 5696, 5696, 5696, 5696, 5696,
> 5696, 5696, 5696, 5696, 5696, 5696, 5696, 5696
> it goes on.....
>  Also, the unkillable has only 1 thread as shown in the top output.

rc.d scripts just send a SIGTERM to the process by default.  If apache
has blocked that signal, there's not much the script can do.  What you
could do is edit apache2.sh and add a line saying "sig_stop=-KILL",
which will make the shutdown action send a SIGKILL (aka -9) signal to
apache.  This won't be a clean shutdown, though.  Better to try and
debug apache and find out what it's doing.

-- 
	Dan Nelson
	dnelson_at_allantgroup.com
Received on Wed Jun 08 2005 - 13:42:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:36 UTC