Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

For the last week, sites on my VPS have been loading extremely slowly, sometimes even timing out. Could you please take a look at my Apache2 'server-status' output and let me know if you see anything interesting? I see a lot of "OPTIONS * HTTP/1.0" requests where the client is localhost ( I really have no idea what is going on.

Any help would be greatly appreciated.


For first reply:

apache2.conf extract:

Timeout 300

# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
KeepAlive On

# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
MaxKeepAliveRequests 100

# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 2

## Server-Pool Size Regulation (MPM specific)

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers       1
MinSpareServers    1
MaxSpareServers    5
MaxClients        40
    MaxRequestsPerChild   500

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers       1
MaxClients        40
MinSpareThreads    1
MaxSpareThreads    4
    ThreadsPerChild      25
    MaxRequestsPerChild   500

share|improve this question
mod_status is really not a complete picture of your server's status. What kind of content is it serving that's slow? If it's dynamic content, then that's the first place I'd look. What do load average numbers look like? – Shane Madden Jan 21 '12 at 23:14
dynamic content and load averages look ok atm (.25, .68, 1.73) but when the site was loading very slowly they were more like 4, 5, 6. Every couple seconds I see an apache process with <defunct> next to it (in top) - why is that. Also, should I be concerned about the "OPTIONS * HTTP/1.0" requests where the client is localhost ( - at times I've seen > 10 of them when viewing mod_status. – Nick Jan 21 '12 at 23:21
the OPTIONS call from localhost is most likely apache's internal signaling ... check the user agent in your access log, and it should mention 'internal dummy connection'. – Joe H. Jan 21 '12 at 23:30

Are you running cPanel on your setup? The "OPTIONS * HTTP/1.0" is used by cPanel to check the status of the server, but shouldn't in itself be causing any additional load on the server so my guess is that there is something else and without additional information from you its very hard to suggest something else.

When checking your status page aswell as browsing and it replies fast to me. The /server-status page doesn't indicate any currently high load either, so right now its probably very calm for you too?

You usually have to observe the server while the pages load slowly to get a better picture of what the issue is, if Apache is configured to allow too few connections, if you are running out of memory under high usage. Maybe you were under attack or you could just have had someone link something popular from your site? A combination of reading logs in hindsight aswell as actively monitoring the performance while something happens usually gives you more details.

Edit 1:

I really think that your low values of this block is what causes you to sometimes have queues and low performance. Try something like this:

<IfModule mpm_prefork_module>
StartServers 10
MinSpareServers 5
MaxSpareServers 5
MaxClients 100
ServerLimit 100
MaxRequestsPerChild 100
share|improve this answer
Not running cPanel. And everything is running nicely at the moment - thankfully. Thank you for the tips. Next time it starts running slowly I'll try and gather as much information as I can. How would I be able to tell if Apache was configured to allow too few connections? Please see original post for apache2.conf file extract. – Nick Jan 21 '12 at 23:38
I'd really increase StartServers, MaxClients, etc. a lot if I were you, but how much you do it depends on the amount of RAM and if things start to run worse with higher numbers. See my Edit above. – Mattias Ahnberg Jan 21 '12 at 23:55
I'm on the X2 Linux Plan here - Guaranteed RAM 384MB. – Nick Jan 21 '12 at 23:58
Hmm, okey, then you probably need to lower MaxClients and ServerLimit a little bit compared to my examples, try to tweak it up & down until you feel its alright and memory usage doesn't become an issue for you. – Mattias Ahnberg Jan 22 '12 at 0:02
Excellent! Thank you very much Mattias. When the server was running very slowly I opened up top and saw a pile of apache2 processes - as if they were in a line waiting. I will give this a go. Nick. – Nick Jan 22 '12 at 0:03

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.