Hi Yves,

On Mon, Sep 14, 2015 at 04:30:22PM +0200, Yves Van Wert wrote:
> Hi list,
> 
> we have a backend configuration that uses sticky session based on a
> cookie.  This works wel in 99.99% of all requests. The problem is with the
> 0.01% of requests where the client switches backend.  Is there any way i
> can debug this ? The backend server is not reported to be DOWN.  I can't
> seem to find any reason why a session would switch backend.  It's not like
> all sessions on that backend move server.
> 
> backend weblogic-forms
>         mode http
>         balance roundrobin
>         cookie SERVERID insert indirect nocache
>         option httpclose
>         option forwardfor
>         option httpchk HEAD /check.txt HTTP/1.0
>         option log-health-checks
>         server ias03 10.64.0.81:8888  cookie ias03 check inter 3000 rise 5
> fall 6 weight 40
>         server ias04 10.64.0.82:8888  cookie ias04 check inter 3000 rise 5
> fall 6 weight 10
>         server ias05 10.64.0.181:8888 cookie ias05 check inter 3000 rise 5
> fall 6 weight 40
>         server ias06 10.64.0.182:8888 cookie ias06 check inter 3000 rise 5
> fall 6 weight 10

I'm pretty sure the cause is only "option httpclose" which is also called
"passive close" : haproxy only adds "Connection: close" in both directions
and lets the other ends close by themselves. If they're deciding not to
close and to pass extra information, they will remain connected. It could
for example happen with some broken proxies which aggregate outgoing
connections from multiple clients without properly watching the Connection
header. Please just replace "option httpclose" with "option http-server-close"
and I'd bet the problem will disappear.

> the haproxy version we are using is :
> 
> /usr/sbin/haproxy -v
> HA-Proxy version 1.5.11 2015/01/31
> Copyright 2000-2015 Willy Tarreau <[email protected]>

1.5.14 has been available for quite some time to fix several bugs, and 1.5.15
will be available shortly to fix even more. Once your problem is solved, please
consider upgrading.

Regards,
Willy


Reply via email to