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

My client sends out eblasts at 8am monday/wed/friday. Between 8:15-8:45 the site becomes extremely slow and many users sessions timeout.

My setup: Mediatemple VE 2gb dedicated ram (3 burst) Ubuntu 9.10 Apache2-mpm-worker PHP5.3-fcgi MySQL 5

I recently tried to remedy the problem by switching from apache2-mpm-prefork to mpm-worker, but am still having the same issues.

My apache settings are:

Timeout 100
KeepAlive On
MaxKeepAliveRequests 100
<IfModule mpm_worker_module>
    StartServers         12
    MinSpareThreads      25
    MaxSpareThreads      96
    ThreadLimit          96
    ThreadsPerChild      25
    MaxClients          225
    MaxRequestsPerChild   0

The site is only getting ~10,000 page views during the 8am-9am hour, which I dont think should be stressing the server too badly. Maybe it is an error with the PHP settings, or bandwidth per unit time, or the site outgrew the server?

Any suggestions would be very helpful - as you can see i've given it a good go before looking for help (installed mpm-worker).

Also, can anyone suggest to me some free load testing software, or a tutorial on mod_status?

Thank you

share|improve this question
As far as load testing goes, httperf (Linux package) and are some good ones. – nojak Aug 30 '12 at 6:24
What is ulimit -n result gives you? – Abhishek Anand Amralkar Sep 15 '13 at 11:05

It very much depends on the application as well as the traffic / usage patterns. I'd recommend logging onto the server at the time ( if at all possible ) to collect some vital statistics :

  • Amount of Apache processes running
  • Average memory used per Apache process
  • Total memory used by applications / non-cached.
  • CPU usage / load averages
  • Amount of open files on disk
  • Amount of (insert database here) connections open.

And then I'd also have a look through the logs to see if there are any error messages being displayed.

Depending on how your services are configured it could be just about anything ranging from memory exhaustion, to cpu overload, to mysql connection pool exceeded, to apache connection pool exceeded.

You could also use such tools as iotop, mytop, top, and ntop to see in realtime what's going on or you could use apache's 'ab' to do some minor load testing. Ultimately though I think you might need something more intelligent and programmable to more closely replicate your client's usage patterns. Doesn't have to be fancy really, a few shell+curl scripts to access various parts of your site.

share|improve this answer
I took your advise and installed mod_status, mytop, and have done some testing with AB. I have found that the site maxes out the 3gb of available memory with ~300 concurrent connections... and that the majority of the ram is being used by php5-cgi. This makes me think that the fcgi-wrapper may not be working? but the phpinfo says it is running on FCGI. I followed this setup detailed here: I have read some other posts about setting PHP_FCGI_CHILDREN, but I can not find a php5.fcgi file to configure. – naunu Jul 9 '10 at 9:17
Also - i have no directories php5-fcgi, and do not see any reference to fcgi aside from the apache mod. – naunu Jul 9 '10 at 9:19

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.