I used the unit 'S' for my timeouts, as in

clitimeout 60S
contimeout 60S
srvtimeout 60S 

Is that to be avoided? I assumed it meant "seconds."

I'm using roundrobin and adding the httpclose option. I've been using
cookie stickiness (which will be important for this website), but after
disabling this stickiness, I get the same results. I tried clearing out
the server cookie before and opening the page in multiple browsers, and
still got these results.

Thanks,
Thomas Allen
Web Developer, ASCE
703.295.6355

-----Original Message-----
From: Willy Tarreau [mailto:[email protected]] 
Sent: Monday, March 09, 2009 4:09 PM
To: Allen, Thomas
Cc: Jeffrey 'jf' Lim; [email protected]
Subject: Re: "option httpchk" is reporting servers as down when they're
not

Hi Thomas,

just replying quick, as I'm in a hurry.

On Mon, Mar 09, 2009 at 04:01:29PM -0400, Allen, Thomas wrote:
> That, along with specifying HTTP1.1, did it, so thanks! What should I
> load into "Host:" ? It seems to work fine with "www", but I'd prefer
to
> use something I understand. Please keep in mind that none of this is
yet
> associated with a domain, so www.mydomain.com would be inaccurate.

Of course, www.mydomain.com was an example. Often web servers are fine
with just "www" but normally you should use the same host name that
your server will respond to. Sometimes you can also put the server's
IP address. Some servers also accept an empty header (so just "Host:"
and nothing else).

> Beginning very recently, I get a 504 Gateway Timeout for about 30% of
> all requests. What could be causing this?

responses taking too much time. Are you sure that your "timeout server"
is properly set ? Maybe you have put times in milliseconds there
thinking
they were in seconds ?

> More importantly, I'm not
> convinced that HAProxy is successfully forwarding requests to both
> servers, although I could wrong. As you can see on the two app
> instances, each reports a separate internal IP to help diagnose. It
> appears that only SAMP1 receives requests, although both pass health
> checks now.

I see both servers receiving 20 sessions, so that seems fine.
Among possible reasons for what you observe :
  - ensure you're using "balance roundrobin" and not any sort of
    hash or source-based algorithm

  - ensure that you have not enabled cookie stickiness, or that
    you close your browser before retrying.

  - ensure that you have "option httpclose" and that your browser
    is not simply pushing all requests in the same session tunnelled
    to the first server haproxy connected to.

Regards,
Willy


Reply via email to