[Mongrel] Apache mod_proxy_balancer hang on high traffic hour

Kirk Haines wyhaines at gmail.com
Sat Sep 15 17:54:55 EDT 2007

On 9/13/07, Yan Meng <dreamwords at gmail.com> wrote:
> more info
> just 1 server
> webserver + appserver + dbserver
> On 9/14/07, Yan Meng <dreamwords at gmail.com > wrote:

> > We use APACHE + mod_proxy_balancer + mongrel to deploy our application, it
> workd super in the past few monthes.
> >
> > However, just  from last week, at high traffic hour (about 40,000 request
> per hour), our site is very very slow, it usually took more than 10 seconds
> to get a page or simply return timeout error.
> >
> > I telnet to the server and found that when I visit directly to one mongrel
> instance, it can return shortly, however when I visit from apache interface,
> it hang.
> >
> > I also cannot visit (timeout) the mod_proxy_balancer's frontend to see the
> balance-manager.

I've been letting this one bounce around in my head for a while.

I think that sentence there, right at the end of what I quoted, is an
important clue.

If you can't get to the mod_proxy_balancer's front end, then Apache is
failing to field the request in the first place.  Start there.  Look
at your Apache config.  Look at your Apache.  Are you using an Apache
that has things built into it, or loaded, which are not needed?  If
so, rebuild without those items, or comment them out of your
configuration.  Look at your allowances for keep alive, and for
MaxClients and related load handling config items.

After you look at that, then come back and look at mongrel and your
application.  Do you know how fast your app actions are?  Do you have
some actions that are very slow?  Are you facing a situation where
some bottleneck is preventing your one server from handling requests
as fast as they are coming in?

40k requests/hour on your single server may or may not be a problem.
It all depends on the application.  That's only about 11
requests/second, which isn't really a lot.

That's about all that can be said without more information and analysis.

Kirk Haines

More information about the Mongrel-users mailing list