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

We're getting tons of traffic but it's causing the site to respond extremely slowly, or not at all. I'm in WHM checking out the load, the top processes, etc but I can't seem to find exactly what the problem is.

How can I see what is being accessed in real-ish time? If I know that I can disable all sorts of features and save the whole of the site. - click sparingly if you don't mind, I'm dyin' here!

share|improve this question
OS, Software, Logs? Are you sure your MySQL server config is okay? RAM usage? – zaub3r3r Dec 8 '10 at 0:55
up vote 4 down vote accepted

Your first stop should be your apache access logs. The location of these will vary depending on your configuration, but /var/log/httpd/ (or /var/log/apache2, depending on distro) is a good place to start.

share|improve this answer
yes, tail -f your log files and watch what's going on... – Jason Antman Dec 8 '10 at 18:20
Ahhhh thank you : ) – thewebguy Dec 9 '10 at 20:53

Try netstat -nt | grep :80 as a starting point. This will pick up connections which haven't hit the access logs, as well as connections which have recently be closed.

Try netstat -nt | grep | cut -c 44-64 | cut -d: -f1 | sort | uniq -c | sort -nr to get counts by recent connections. Check the IP address I used.

EDIT: Changing your accesslog configuration to record response time (%D or %T) instead of ident name (%l) will allow you to collect data on which URL patterns are slowest. Doing so when the whole site is slow may not provide useful statistics.

Use top to ensure you are using a significant amount of swap space. If you have a memory leak then limiting MaxRequestsPerChild to 100 or 100 may help until you find and fix the problem.

share|improve this answer
netstat is certainly a useful tool, but it's not going to tell him what portions of his site he'll be able to disable to improve performance (which is a goal he stated). – EEAA Dec 8 '10 at 13:49
@ErikA A sudden increase in traffic may signify a DOS. netstat can help identify this issue. I have updated my response with some server specific hints. – BillThor Dec 8 '10 at 17:19

Most probable cause of the problem will be Mysql. Enable slow query log on the mysql server and analyse the slow queries on how they can be improved by indexes etc.

A performance improvement tip.

While opening your site in firebug, a Firefox extension, I see most of the requests are for static content i.e images. Why don't you use a seperate domain i.e. and use a light weight webserver like nginx or lighttp to server those requests or offload it to amazonaws like you are for some requests.

share|improve this answer

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.