*BSD News Article 95052


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!serv.hinet.net!ctu-peer!news.nctu.edu.tw!spring.edu.tw!news-peer.gsl.net!howland.erols.net!ais.net!newsfeed.direct.ca!nntp.portal.ca!news.bc.net!unixg.ubc.ca!rover.ucs.ualberta.ca!not-for-mail
From: Marc Slemko <marcs@znep.com>
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: Unexplained CPU usage on Apache httpd
Date: 9 May 1997 15:51:48 GMT
Organization: University of Alberta
Lines: 40
Message-ID: <5kvh6k$5c4$1@pulp.ucs.ualberta.ca>
References: <33731156.1E6F@chesapeake.net>
NNTP-Posting-Host: gpu5.srv.ualberta.ca
X-Newsreader: NN version 6.5.0 (NOV)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.bsdi.misc:6841

First off, if you aren't using 1.2b10 you would probably be wise
to upgrade to it to see if it fixes your problem.

Is it just one Apache process that is eating CPU?  Is the the
parent process (ie. the one normally owned by root that forks 
child servers) or one of the child processes (that actually serves
requests)?  

Try a ktrace on the runaway process to see what system calls it is
calling.  Something like:

	ktrace -p 666
	[ ... wait 20 seconds ...]
	ktrace -C
	kdump |less

Where 666 is the pid of the process that is running away.

In <33731156.1E6F@chesapeake.net> support@chesapeake.net writes:

>For the past several nights our Apache web server has unexplainably
>frozen (almost) due to an extremely high CPU percentage.  Using the TOP
>caommand I can see that it is using 98% CPU and not accepting and any
>requests from inside our network or out.

>The only way to fix it is to SIGHUP the httpd daemon.  That seems to
>work until the next time.

>We do have about 50 virtual servers running on our system, but we upped
>the minservers and maxservers parameters in the httpd configuration
>files to try and compensate.

>Any suggestions would be appreciated.

>Thanks,

>Fred Brechbiel
>Sys Admin
>Southern Maryland Internet
>http://www.chesapeake.net