LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Hanging apache

[ILUG] Hanging apache

Niall O Broin niall at linux.ie
Thu Jan 25 13:46:43 GMT 2007


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




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell