Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Every few days my server crashes. The load average and memory usage is very high, until it stops answering to all requests.

Tne strange thing that happen when this happens, is that static pages continues to work great, even with high server load, but pages with mysql queries run slowly or even sometimes do not answer the requests.

I could not find anything that could happen on /var/log/messages

When I type top on the shell I get something suspect like this:

12508 nobody    18   0  214m  19m  12m R 81.8  0.2   4:02.62 httpd 

I'm not sure, but this means that there is a httpd process running for over 4 hours?

Other processes also have a high TIME+ value when the server is almost completely crashing.

Could theses processes be the problem?

Is there anyplace where I can find mysql logs? I found nothing on /var/log/mysql.

Does anyone have any idea about what could be the problem?

share|improve this question
    
add comment

2 Answers

up vote 2 down vote accepted

A great many things could be the problem. If you're swapping, then your system doesn't have enough memory, and you either need to upgrade or reduce the number and/or size of the processes running.

An Apache worker process with 4+ hours of CPU time (or that was started over four hours ago) is not a problem; that's what it's supposed to do -- hang around and consume CPU while serving requests. Apache workers could be the cause of the problem, but from the information provided it's impossible to say.

I could go on and on, but I already have, in an article I wrote about hunting down performance problems on Linux systems. I'd highly recommend reading it, following it's recommendations, and then coming back with new questions containing specific analysis data if you need help interpreting something.

share|improve this answer
add comment

You may have a disk subsystem or I/O problem. Do you have time gaps in your logs? Some processes may be running in RAM while anything requiring disk access stalls or fails, increasing the load. How are you recovering from this? A hard reboot?

share|improve this answer
    
I already rebooted the server once today. But the broblem came back. The only strange thing that I noticed was that the "Blocks Written/Sec" was over 18.000. I think this is a very high number. Isn't it? –  valter Sep 20 '11 at 1:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.