|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
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 ** |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#5 (permalink) |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#6 (permalink) |
|
Messages: n/a
Hébergeur: |
"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/ |
|
|
|
#8 (permalink) |
|
Messages: n/a
Hébergeur: |
"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/ |
|
![]() |
| Outils de la discussion | |
|
|