Hi there

seems like the failing requests issue is related to the check interval for
"option httpchk /health_check.html"

I guess these requests are being queued by Apache itself.
We're having a couple of long running requests on our machines. These requests are queued in Apache by the Apache and Passenger internal queue. Maybe the check requests are so as well. So, if it takes longer than the specified check interval to complete the check request, HAProxy treats Apache to be down. And as there is no other server to forward the request to, the reuqest is dismissed.

After increasing the check interval, HAProxy works fine.

Does anyone have experience with having "option httpchk" enabled for Passenger?

Thanks

Matt


Willy Tarreau wrote:
On Thu, Feb 19, 2009 at 10:02:36AM +0100, Matthias Müller wrote:
Hello there

I'm trying to find a suitable solution to load balance Rails applications via Passenger and HAProxy.Currentliy I'm doing a lot of testing using Apache Bench.

The setting is as simple as follows:

machine A: HAProxy
machine B: Apache with mod_rails

my test: 100 concurrent requests via Apache Bench

When running 100 concurrent requests against HAProxy, Apache Bench has a lot of non 2XX responses and I get a lot of BADRQ in my HAProxy log like:

Feb 19 08:50:25 localhost.localdomain haproxy[1890]: 10.0.0.1:33917 [19/Feb/2009:08:50:10.898] http-proxy http-proxy/member1 -1/13816/1/-1/14702 503 13757 - - ---- 99/99/99/9/0 0/32 "<BADREQ>"

There's something odd in the log above. It implies that the request was sent
into the queue waiting for a server to be free, but also that the request was
invalid or perhaps empty. I suspect that AB has timedout slightly before
haproxy while waiting for a server response, but I don't understand why we
have "BADREQ" here, we should not have got a 503 with BADREQ. Could you please
indicate what exact version this is ? This would help explaining why we can
have BADREQ and 503 at the same time.

Regards,
Willy



Reply via email to