httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trevor Phillips <>
Subject [users@httpd] Apache bottleneck problems
Date Wed, 04 Mar 2009 06:39:44 GMT
I've been a long time administrator of Apache servers in a University
environment (translation: a LOT of variety in what content & apps are
on the servers), and our configuration isn't getting simpler.

One of our sites is currently set up with a reverse proxy in front of
two back-end sites, of which one site is load balanced across two
servers. One of the goals with the load-balanced section of the site
was for fail-over if something bad happened to one of the servers.

The problem we're having is that if "something bad" happens to any
back-end server, then the reverse proxy workers are all soaked up by
incoming requests for the broken part, which then blocks access to the
rest of the content.

Is there a way to limit how many workers buffer up requests for each
back-end server? Or even based on Location or URL pattern match?

Even within one server, we encounter this problem on a smaller scale
occasionally - one heavy dynamic part of the site grinds to a crawl,
all apache daemons queue up queries for that part, and all the rest of
the content suffers as a consequence.  If a sub-part of the site does
encounter problems, then it would be preferable to politely drop extra
connections to that part of the site and get on with providing the
rest of the content to clients.

Here's snippets of part of our apache & proxy config:

  Timeout 300
  KeepAlive On
  MaxKeepAliveRequests 100
  KeepAliveTimeout 15

  <IfModule mpm_prefork_module>
    ServerLimit           700
    StartServers          20
    MinSpareServers       10
    MaxSpareServers      30
    MaxClients          700
    MaxRequestsPerChild 500

  <Proxy balancer://backend>
         ProxySet lbmethod=byrequests

  RewriteRule ^/$ balancer://backend/ [P,L]
  RewriteRule ^/(patternmatch.*) balancer://backend/$1 [P,L]
  RewriteRule ^/(.*)$1 [P,L]

If one of the nodes in balancer://backend dies, then typically it does
not fail over fast enough to stop the proxy snowballing, and when it
does failover, typically the second node then snowballs & dies from
the sudden influx of banked up requests.

I did some tests setting smax and max for the BalancerMembers - I set
smax=5 max=10, and then used ab to hit it with 50 concurrent hits -
both the Proxy and the back end showed 50 active connections. So
either smax/max aren't taking effect, or I'm completely
misinterpreting what they are supposed to do.

We're using Apache 2.2.3 under Debian 4.0 (Etch) - and apparently the
Prefork version.

Any ideas/help would be greatly appreciated. Thanks!

Trevor Phillips  -
"On nights such as this, evil deeds are done. And good deeds, of
course. But mostly evil, on the whole."
      -- (Terry Pratchett, Wyrd Sisters)

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message