Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

CentOS 5.2 LAMP server

The server slows down to a point where no services are responding. After a few minutes, it comes back and is running well. The server keeps doing this cycle, what could be wrong?

I have stopped the exim and proftpd services for now. I used the top command to see CPU usage but all was 0 even when the server stopped responding. I also had a Java tomcat service running which I have stopped as well but the problem still persists.

The logs aren't showing any signs of a dos/ddos.

Any ideas?

share|improve this question
what dmesg is showing?? – B14D3 Mar 1 '11 at 13:46
up vote 0 down vote accepted

A quick list of things to check:

  • Check top for the CPU usage, load, and memory usage. This should give you a good indication of what the problem is or isn't. If the load is very high you just have too much traffic for your server to handle. If you have high IO wait% you have too much disk activity. If you have no load/CPU usage at all then it will likely be some sort of application lock up.
  • In top check for applications using a lot of memory/cpu (M=sort by memory, P=sort by CPU usage), or at least more than they should. Check for locked-up applications by looking for a 'D' in the 'S' column.
  • Check top/free/vmstat for swap usage. It should be 0 or very low. If you are using swap you'll have to reconfigure your LAMP stack to use less memory.
  • Check netstat for any signs of DoS (for example).
  • Check system (/var/log/messages) and application logs (Apache, MySQL, etc...) for relevant error messages. If it is reoccuring every few minutes you may be able to see a pattern of error messages.
  • Check disk space via df -h and disk status with smartctl.
  • If all of that doesn't appear to show any issues it may be some sort of application issue or dead lock. Try enabling/adding debug logging to the app and see if you narrow down where the issue occurs.
share|improve this answer

Probably the best tool to check out in this case is sar. It should show you stats up to and including when the server freezes up. If you don't have it installed, it's part of the sysstat package.

How often is it doing this? Once a day, or every few hours? It sounds like it could be memory or disk I/O, but I'm not too sure.

share|improve this answer
Will have a look into the sysstat thanks. It's just started doing it about an hour ago and it keeps repeating the cycle of working fine, then offline for 2 or 3 mins, then up again. – user69904 Mar 1 '11 at 12:57

Your Answer


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.