Web Hosting Talk







View Full Version : Server load questions


silversamuri
08-21-2002, 02:31 PM
Hi, I've been having some major problems with my server load lately and I was hoping some of you would be able to help me out.

My load is spiking up to huge numbers (over 40 at some points) that make accessing the server at all problematic. People can't connect to SMTP, FTP, HTTP, etc.

A few run-away httpd processes are to blame most of the time I believe -- running top, it's clear to see that there are the perpetrators, and when I kill them the load gradually goes back to normal.

I've read up a little on RLimitCPU and RLimitMEM (http://httpd.apache.org/docs-2.0/mod/core.html#rlimitcpu) but I wasn't sure what settings to use for soft/max. Does anyone have these directives in place? If so, what do you suggest for acceptable settings?

What's your average load? Mine used to be well below 1 but now it's common for me to see loads of 10 and above. My host told me not to worry about it but it's kind of hard not to worry when I can barely SSH into the server.

I'm running Ensim and it's kind of hard to trace the process to a certain user -- does anyone have any tips for this? In the Ensim docs it says that it's possible by running "sitelookup" after doing a ps but I haven't been successful here.

Thanks in advance,
Eugene

silversamuri
08-21-2002, 05:39 PM
Has anyone ever used the program softlimit? I'm thinking about using it to keep httpd in check but I'd like to know if anyone has used it or recommends something else. Here's a link to the Softlimit website (it's distributed in a package called Daemontools).

http://cr.yp.to/daemontools/softlimit.html

Thank in advance,
Eugene

mdrussell
08-21-2002, 06:29 PM
How much traffic is your server doing?

RLimitCPU and RLimitMEM will only really make a difference if you're running a lot of CGI scripts - and then too low limits can cause them to timeout.

Matt

Smokie
08-21-2002, 07:20 PM
read this fourm it might help
http://forum.rackshack.net/showthread.php?threadid=7414

netacore
08-21-2002, 09:30 PM
silversamuri,

If it's a bunch of httpd processes that are spawning over and over, compare the pid of several httpd processes to yourdomain.com/server-status

There you can see who, what and why is calling apache.

It might just be a poorly written script :(

BurtonHost
08-22-2002, 02:43 AM
I've had issues with this: PHP scripts run under apache so it's hard to track them down if they are open looped PHP scripts which can cause a crash or something. You have to be monitoring at the time and check what is calling apache (compare PID like netacore said)