Re: Rails app with maxconn 1 receiving more than 1 request at a time

From: Willy Tarreau <w#1wt.eu>
Date: Sat, 13 Sep 2008 07:35:47 +0200


Hi guys,

On Fri, Sep 12, 2008 at 05:44:37PM -0700, Rupert Fiasco wrote:
> The max conns on the stats seems to be crazy high.
>
> http://brockwine.com/images/haproxy_stats.png

Huh! this is totally unexpected ! In fact, you could see more session when looking on the server than you see on haproxy if the server times out and takes time to close a socket. But here it is haproxy which sees more sockets than it allows itself. Clearly that's a bug.

> Also, what constitutes an error/warning? I seem to be seeing a lot of
> those as well. Does that mean by backend is returning a bunch of HTTP
> 500 or is it an internal haproxy error/warning?

No, the response errors are likely server timeouts (which are expected if we send too many connections there, BTW). The warnings indicate connection retries (because of rejects or timeouts) and even redispatches (attempts to reconnect to another server). I don't know if it is the redispatch which is bypassing connection limits or something else.

What I find strange is that none of you has had requests queued on servers. Maybe you never have any persistence cookie, which explains that requests are only queued at the backend.

I need to find what is common between your configs. Could you please send them to me privately so that I can investigate ? Remove you stats passwords and IP addresses if you want.

Thanks,
Willy Received on 2008/09/13 07:35

This archive was generated by hypermail 2.2.0 : 2008/09/13 07:46 CEST