httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Petrovsky" <tp...@voicenet.com>
Subject Re: Server going Wild
Date Fri, 02 Aug 2002 19:52:37 GMT
You're welcome, Dave; let me/the group know how you make out.

(Re: recompiling the kernel, first time I did it I was mucho afraid; after
that, almost blasé.  But it's really great for "geek points" ... :o)

----- Original Message -----
From: "Cartoon Factory" <gallery@cartoon-factory.com>
To: <users@httpd.apache.org>
Sent: Friday, August 02, 2002 3:42 PM
Subject: RE: Server going Wild


> Michele:
>
> Thanks for your insight! I am not afraid of recompiling if I have to. For
> the most part, when I put it all together, I did not do much special. I
for
> sure do not remember anything to do with nice levels, or monk eying with
> that (to be honest, I would not know how.)
>
> I personally think I have a CGI script (run from a web page) that is
running
> wild, that does not terminate, and just goes crazy.
>
> I THINK I might have found the root cause, things have been stable for a
> while. I hope I caught it....
>
> Thank You!
> -------------------
>
> Dave Koch
>
> -----Original Message-----
> From: Michele Petrovsky [mailto:tpark@voicenet.com]
> Sent: Friday, August 02, 2002 1:38 PM
> To: users@httpd.apache.org
> Cc: shinton.d@gmc.edu; rocque.m@gmc.edu; Tom Parkinson
> Subject: Re: Server going Wild
>
>
> Dave, it definitely looks like something in how Apache is configured is
> causing the children to go loco.  Output sample very helpful.  Given those
> numbers, for some reason when the parent httpd (which itself seems to me
to
> have a rather high priority) spawns its kids, it gives them nice and PRI
> numbers way out of keeping with its own.
>
> I'm not knowledgeable enough about Apache to know which (if any) of its
> config params would control something like this.  Quick fix probably would
> be to "nice" the parent up/down to NICE/PRI numbers that are more
reasonable
> (maybe 180 PRI?)  Then, even if the parent spawns children with even more
> clout than it has, the numbers for those children should still be fairly
> reasonable.  For instance, applying the ratio demonstrated in your sample
> output, "nicing" the parent httpd down to a 180 PRI should, hopefully,
bring
> the children down to, maybe, an 80 or 90 in that department.
>
> I noticed too that not only all your httpds but all your other processes
> have a nice number of 0, which I've *never* seen.  All the Unix (H-P
mostly)
> and Linux (Red Hat mostly) boxes I've dealt with have nice set largely or
> exclusively to 20, with the occasional but fairly rare 10.  Could it be
that
> in compiling your kernel the default nice number was set too low?  If
that's
> the case, you may need to reconfigure/recompile.
>
> But hang on; further investigation in progress ... :o)
>
> ----- Original Message -----
> >From: "Cartoon Factory" <gallery@cartoon-factory.com>
> To: <users@httpd.apache.org>
> Sent: Friday, August 02, 2002 2:58 PM
> Subject: RE: Server going Wild
>
>
> > Michelle:
> >
> > Thanks for the help. I guess I did not explain too well. I am watching
> > top... and all of a sudden a process will just take off. Typically, the
> > httpd PRI number in TOP is 2... but the runaway will shoot way up to 64.
> My
> > typical size is 20000K- these will shoot up to the 150M range and WCPU
and
> > CPU will go from 2-5 % to 80%.
> >
> > So I sit here all day and watch TOP and kill those bad processes. I wish
I
> > COULD figure out what causes them! In the meantime, I wanted to figure
out
> > how I could get apache to say, "Wow, this one is way out of normal
> > parameters..." and kill it itself.
> >
> > I also noticed when the runaway starts, and I kill it, I usually have
> about
> > 5-10 other processes to kill.... I take one down, another springs up
like
> a
> > hydra!
> >
> > Here is one starting (from top):
> >
> >   PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
> > 82353 nobody    55   0 37060K 25424K RUN      0:08 44.99% 30.76% httpd
> > 81539 nobody     2   0 20852K 18060K sbwait   0:02  0.93%  0.93% httpd
> > 82352 nobody     2   0 19992K 17308K sbwait   0:00  1.29%  0.88% httpd
> > 82087 nobody     2   0 24308K 21676K sbwait   1:40  0.29%  0.29% httpd
> > 81471 nobody     2   0 19992K 17448K accept   0:02  0.24%  0.24% httpd
> > 82307 nobody     2   0 19992K 17296K accept   0:00  0.25%  0.24% httpd
> > 81466 nobody     2   0 20416K 17900K sbwait   0:02  0.15%  0.15% httpd
> > 81542 nobody     2   0 20420K 18000K sbwait   0:02  0.05%  0.05% httpd
> >   109 root       2   0  6344K  2092K select   3:24  0.00%  0.00% perl
> >  5914 root       2   0  1792K   516K select   1:11  0.00%  0.00%
sendmail
> >    82 root      10   0   992K   232K nanslp   0:11  0.00%  0.00% cron
> > 79875 root      28   0  1992K  1020K RUN      0:06  0.00%  0.00% top
> >    89 root       2   0   916K   108K select   0:05  0.00%  0.00% usbd
> > 81467 nobody     2   0 21776K 19184K sbwait   0:05  0.00%  0.00% httpd
> > 74400 root       2   0  2476K   984K select   0:04  0.00%  0.00% sshd
>  > 81472 nobody     2   0 21316K 18708K sbwait   0:03  0.00%  0.00% httpd
> >
> > Thank You!
> > -------------------
> >
> > Dave Koch
> >
> > -----Original Message-----
> > From: Michele Petrovsky [mailto:tpark@voicenet.com]
> > Sent: Friday, August 02, 2002 12:41 PM
> > To: users@httpd.apache.org
> > Cc: rocque.m@gmc.edu; Tom Parkinson
> > Subject: Re: Server going Wild
> >
> >
> > If I'm not mistaken, the higher the integer value of a Unix/Linux
> process's
> > "nice number", the *lower* it is in the pecking order.  So, if your
Apache
> > is running with as high a "nice number"  as 60 ("nice number" is
> Unix-speak
> > for the number used to compute actual process priority  :o), it's
grabbing
> > way too little, rather than too much, CPU time.  But if "ps -l" (process
> > status, long version) reports Apache with a "PRI" value of 60, rather
than
> a
> > "NICE" value of 60, then you're correct that Apache is gobbling up your
> > system's resources.
> >
> > Have you tried back-tracking, so to speak?  Apache, I believe,
ordinarily
> > runs as a single parent process that automatically spawns (generates)
> > several child processes.  (I believe the number of children is equal to
> the
> > value you've defined for the MaxClients parameter.)  Anyway, if there
are
> > child processes hung up or that won't shut themselves down gracefully,
the
> > parent process might not be able to generate new children.  So, when
> you're
> > eyeballing PIDs, it might help to trace them back to their respective
> PPIDs
> > (parent process IDs), if any.  In any case, you might be able to use the
> > command "nice" to correct the 60+ priority value.  If "ps -el" reports
> > something like " ... PRI 60   NICE 30", syntax something like "nice +20
> > httpd" should result in ps giving you more reasonable output, such as "
> ..
> > PRI 80   NICE 50".  (I'm pulling these values off the top of my head,
but
> I
> > think you get the idea.)
> >
> > Re: memory limits, I would tend to think that it's processor time that's
> > your problem.  Another command you might want to try, though, in order
to
> > determine the relative weight of both memory and CPU time in your
> situation,
> > is "top".  It'll give you a real-time picture.  It reports on parameters
> > such as CPU load overall, how much of that is user and how much is
system,
> a
> > breakdown of memory usage by command - lots of good info.
> >
> > Hope this helps.
> >
> > Michele
> > ----- Original Message -----
> > >From: "Cartoon Factory" <gallery@cartoon-factory.com>
> > To: <users@httpd.apache.org>
> > Sent: Friday, August 02, 2002 1:33 PM
> > Subject: Server going Wild
> >
> >
> > > Hi:
> > >
> > > I am running Apache 1.3.26 on FreeBSD 4.6
> > >
> > > I have an occasional problem with processes running wild... it just
> starts
> > > snowballing, gobbling up memory are resources, and slowing things way
> > down.
> > >
> > > I am trying to track down the cause of this, but thus far, I have had
no
> > > luck. I have added PID to the access logs, and when this runs wild, I
> > search
> > > for that PID, but I have not yet been able to catch what is causing
> this.
> > >
> > > So, in the meantime, I want to see if I can configure Apache to close
> down
> > > the wild processes. I have noticed that when it get's going, the
> Priority
> > > shoots way up to 60+. Is there a way (or, better, WHAT is the way) I
can
> > > have apache shut down a process that has a priority over 60? Is this
> wise?
> > >
> > > I have tried RLimitMEM (RLimitMEM 40000 50000), but that does not
allow
> > some
> > > cgi scripts to run... should I use that instead, and set the limits
> higher
> > > (and how high?).
> > >
> > > Any other suggestions so I do not have to stay glued to TOP?
> > >
> > > I am a real newbie, (sorry) so please be a bit verbose in your
response,
>
> > so
> > > I can understand!
> > >
> > > Thank You!
> > > -------------------
> > >
> > > Dave Koch
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message