Linux-Noob Forums

Full Version: Load average is going wild
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hello fellows,

 

I'm having a weird issue and wanted to find out if any of you know how to deal with it.

I've got myself Ubuntu box and online RPG game hosted on it.

The problem is that apache and mysqld is going wild (I mean it).

 

load average: 1.22, 1.20, 1.07

 

That's an usual load when I only have 40 players online.

Tried stopping apache, server load went to 0.02 (ircd was using it)

 

Server speed: 2.0Ghz

RAM: 500mb

apache conf:

timeout 5

 

Keepalive On

keep alive timeout 15

 

My server is good enough for such project and I can bet that I have a bug somewhere in my PHP code, that causes a never ending loop and apache with mysqld are going wild.

 

Mysql is using ~20% of CPU and few apache childs are using ~11% each, so that's really not normal.

 

What do I want you to help me with is a tool for showing php files CPU usage or something similar, so that I could find out which of my files are causing that server load.

 

Thanks in advance,

Faifas


hi, interesting problem as i've seen it myself on this server when it got on the front page of Digg.com

 

however, at the time i didn't bother to read my http.conf better, if i had I probably would have noticed this

 



Code:
# for digg do MinSpareServers 15
MinSpareServers 5
# digg > MaxSpareServers 65
MaxSpareServers 10
#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#
StartServers 15

#




 

i've now changed it to this and restarted apache

 



Code:
# for digg do MinSpareServers 15
MinSpareServers 15
# digg > MaxSpareServers 65
MaxSpareServers 65
#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#
StartServers 15

#




 

i wonder could this also help you ? also, my keep alive is set to Off

 

why have you set yours to on ?

 

cheers

anyweb

keepalive is generally not a good option to have on unless you run like a image hosting service where you want to show a lot of pictures at once to a client

Thank you both for your answers,

 

while I was waiting for them I've realized that I had to do something on my own, so first thing I did was lowered memory setting in php.ini

That really helped a little and now I am going to try out your tips.

 

I never really understood what is keepalive and should I turn it on or off, now I realize that I had to turn it off.

 

Thank you!

Faifas