One mongrel request seems to block cluster

Hello -

I’m new to setting up a mongrel cluster and ran into a question while
doing
some simple performance testing.

I’m using Apache 2.2 as a proxy/load balancer to multiple mongrel
instances
(for this test on the same box - a small EC2 compute unit). I setup
the
cluster with 5 mongrel instances.

Last night I ran “siege” against the server and the performance seemed
to be
fine while hitting a single rails action. But the app I’m working on
does
a web service request that can take up to 20 seconds to get a response.

So to test concurrent performance for this long process while siege was
running against a simple Rails action I used my browser to hit the page
that
called out to the long running web service.

What happened next was that siege stopped outputting any response
information until my browser returned with the response from the web
service
request.

As I said I’m new to this and maybe I’m misinterpreting they way siege
works
but it “appeared” to me that ALL the mongrel instances were blocked
while
one handled this long running request. I can’t imagine that this is
how
it is supposed to work in a properly configured environment but I can’t
find
any other information from googling as to why this might be happening.
It
could very well just be a configuration problem on my end. I’m hoping
that
this is just siege blocking on it’s output :slight_smile:

Thanks for any advice.

Best Regards
Mike


Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Mike,

That sounds similar to a problem I experienced last week. I’m running
apache with mongrel on a windows machine.

It’s not a definitive solution, and I am new to apache/mongrel, but
with that important caveat out of the way I can say that I found
playing with the TTL and timeout parameters in apache.conf had a
positive effect.

The downside is that some long-running queries may get a proxy timeout
message from Apache. Since I’m using caching, this is not a serious
problem - the next request for the same data usually succeeds.

<Proxy balancer://mongrel_cluster>
BalancerMember http://someip max=5 timeout=55 ttl=90 acquire=60

I also assigned a value to ProxyTimeout in the Virtualhost section of
apache.conf. Comments are from the Apache documentation.

#This is useful when you have a slow/buggy appserver which hangs, and you would rather just return a timeout and fail gracefully instead of waiting however long it takes the server to return. ProxyTimeout 90

Good luck,

G u i W e i n m a n n
A L P H A B E T W A R E

Hi Erik -

Yes I meant to cc the list! :slight_smile:

OK - that’s what I’m coming to the conclusion as well that this is the
way
siege behaves because I was able to get a request through just fine in a
sub-second response while siege was hung.

I’m glad you’re seeing this behavior as well so my load balancer is
probably
working.

Thanks very much for looking into this.

Mike