PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > Runaway Apache process
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

Runaway Apache process

Réponse
 
LinkBack Outils de la discussion
Vieux 10/03/2005, 16h19   #1 (permalink)
Morningwood
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Runaway Apache process

Every couple of days a get a httpd process that just will not die
normally, if I let it run it eventually eats up all time on the cpu.

I've tweaked the tuneing parms in the httpd.conf, but I seem to be
missing something.

Can anyone suggest a way to prevent this from happening?

Here is the section I've been changing.

ServerLimit 32
ThreadLimit 64
StartServers 10
MaxClients 150
#Added by Adam Asay 030805
MinSpareThreads 25
MaxSpareThreads 100
ThreadsPerChild 25
MaxRequestsPerChild 5000


The server serves about 200,000 requests a day if that s any.

  Réponse avec citation
Vieux 10/03/2005, 19h26   #2 (permalink)
Dan Wilga
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Runaway Apache process

In article <1110471594.978818.191220@o13g2000cwo.googlegroups .com>,
"Morningwood" <adam.asay@gmail.com> wrote:

> Every couple of days a get a httpd process that just will not die
> normally, if I let it run it eventually eats up all time on the cpu.
>
> I've tweaked the tuneing parms in the httpd.conf, but I seem to be
> missing something.


Rather than focusing on tuning parameters, it would be better to try to
figure out what the particular process is doing when it spikes, then try
to prevent that from happening.

It's very likely that this sort of thing is due to a CGI script bug, NFS
error, database problem, or something like that. Just serving a static
HTML page should never cause this sort of CPU usage.

One way to try to figure this out is to install the server-status
handler. Then, find the PID of the bad process in "top", then switch
over to a browser and see what server-status says it's doing.

# Allow server status reports, with the URL of
http://servername/server-status
# Change the ".your_domain.com" to match your domain to enable.

<Location /server-status>
SetHandler server-status
order deny,allow
deny from all
allow from .your_domain.com
</Location>

--
Dan Wilga dwilga-MUNGE@mtholyoke.edu
** Remove the -MUNGE in my address to reply **
  Réponse avec citation
Vieux 10/03/2005, 19h27   #3 (permalink)
Joshua Slive
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Runaway Apache process


Morningwood wrote:
> Every couple of days a get a httpd process that just will not die
> normally, if I let it run it eventually eats up all time on the cpu.


It is unlikely this has anything to do with a specific httpd.conf
setting.

To find the problem, you'll need to attach to the offending thread with
a debugger and see what it is up to. You'll most likely find a problem
in some module or library linked to apache.

Joshua.

  Réponse avec citation
Vieux 10/03/2005, 23h06   #4 (permalink)
Morningwood
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Runaway Apache process

Any suggestiongs on a debugger to use?

  Réponse avec citation
Vieux 11/03/2005, 19h00   #5 (permalink)
Joshua Slive
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Runaway Apache process


Morningwood wrote:
> Any suggestiongs on a debugger to use?


gdb would be the standard. See, for example:
http://www.objsw.com/docs/gdb_25.html
http://www.objsw.com/docs/gdb_22.html#SEC22

Joshua.

  Réponse avec citation
Vieux 14/03/2005, 16h52   #6 (permalink)
John Murtari
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Runaway Apache process

"Morningwood" <adam.asay@gmail.com> writes:

> Every couple of days a get a httpd process that just will not die
> normally, if I let it run it eventually eats up all time on the cpu.
>
> I've tweaked the tuneing parms in the httpd.conf, but I seem to be
> missing something.
>
> Can anyone suggest a way to prevent this from happening?
>
> Here is the section I've been changing.
>
> ServerLimit 32
> ThreadLimit 64
> StartServers 10
> MaxClients 150
> #Added by Adam Asay 030805
> MinSpareThreads 25
> MaxSpareThreads 100
> ThreadsPerChild 25
> MaxRequestsPerChild 5000
>
>
> The server serves about 200,000 requests a day if that s any.
>


While you are trying to debug this, you might want to add
the following to your httpd.conf file --

RLimitCPU 120

Pick a good number (in seconds) that you think should be
the max for any child process. At least that will kill it without
it consuming a lot of resources -- sometimes, if you monitor the
error log when the kill occurs, you may be able to tell what type
of request(s) is causing the problem. Can be hard with a busy server.

Hope this s.

--
John
__________________________________________________ _________________
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://thebook.com/
  Réponse avec citation
Vieux 15/03/2005, 17h55   #7 (permalink)
Morningwood
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Runaway Apache process

is there a guide to the server-staus page out there?

I enabled it, but i cant seem to match the PID's from the page to the
ones from ps.

  Réponse avec citation
Vieux 18/03/2005, 17h24   #8 (permalink)
John Murtari
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Runaway Apache process

"Morningwood" <adam.asay@gmail.com> writes:

> is there a guide to the server-staus page out there?
>
> I enabled it, but i cant seem to match the PID's from the page to the
> ones from ps.
>


Not sure on the guide, but the PID's it displays should
track to your processes. Just tried it out and they match okay.
Not sure what you are doing with threading, but you may want to
do: ps -elfm (the m to show threads).

Hope this s.
--
John
__________________________________________________ _________________
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://thebook.com/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h26.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11396 seconds with 16 queries