[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ilug
Subject:    Re: [ILUG] Hanging apache
From:       Niall O Broin <niall () linux ! ie>
Date:       2007-01-25 13:46:43
Message-ID: 536A9FB1-94A6-4908-A2B6-EBE6104F81B5 () linux ! ie
[Download RAW message or body]

On 25 Jan 2007, at 13:20, Colm MacCarthaigh wrote:

> On Thu, Jan 25, 2007 at 12:46:15PM +0000, Donncha O Caoimh wrote:
>> I blogged about it a while back:
>> http://ocaoimh.ie/2006/10/01/killing-off-php/
>
> Good god, that's *horrific* advice. That will brutally murder harmless
> requests which are being served by perfectly fine threads.

It's a tad violent alright, but I think I'm going to use it in this  
case because it's a very simple approach which will probably solve my  
problem, albeit in a brutal way.

The alternative I considered is to periodically run a script which  
sees how many processes are running. If that's the max. allowed it  
will then check for the CPU usage of eaach process, just as Donncha  
did, and then if it finds ALL the processes have a CPU usage > 0, it  
will restart the server.

Again, this is a brutal approach, but probably a bit less than brutal  
then Donncha's (actually, it's probably more brutal, but less often).

The third approach is to use the various forensic techniques already  
suggested by Colm and find out what request is causing the problem,  
and then find out where the bug is in the code, and solve it. This is  
of course the best approach.

But, those of you working in the real world know what's going to  
happen here. Yes, number 1, aka the O'Caoimh shotgun, is going to win  
the day. This is old cruddy code, and there is no budget for  
improvements. It needs to be stopped from hanging, and if that  
results in the death of some "perfectly fine threads" then that's the  
price we have to be prepared to pay for our liberty.




Niall

-- 
Irish Linux Users' Group mailing list
About this list : http://mail.linux.ie/mailman/listinfo/ilug
Who we are : http://www.linux.ie/
Where we are : http://www.linux.ie/map/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic