I had the same happen to me. What I did was install monit which watches
over things and restarts Apache when things get too bloated or if Apache
stops responding.
I also have the following entry in my crontab which kills particularly
busy Apache processes:
*/10 * * * * ps auxw|grep apache2| awk '$10 !~ /0:00/ {print
$2":"$10}'|awk -F ':' '$2 !~ 0 {print $1}'|xargs kill -9 2> /dev/null
I blogged about it a while back:
http://ocaoimh.ie/2006/10/01/killing-off-php/
Donncha
Niall O Broin wrote:
> I have a server which serves a number of domains. One of the domains can
> sometimes get very busy (to the extent of leading to a server load of
> 40+) so it was transferred to an IP of its own, with its own copy of
> apache running limited to a certain number of processes.
>> The problem is that sometimes, this apache hangs. Its processes are
> still there, but they won't serve any pages. Sending a HUP to the lead
> process doesn't help, and the only solution to the problem is to stop
> and restart the server.
>
--
Donncha O Caoimh
http://ocaoimh.ie/ // http://inphotos.org/
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!