On Sun, Sep 30, 2018 at 12:23:20PM +0300, Ciprian Dorin Craciun wrote: > On Sun, Sep 30, 2018 at 12:12 PM Willy Tarreau <[email protected]> wrote: > > > Anyway, why am I trying to configure the sending buffer size: if I > > > have large downloads and I have (some) slow clients, and as a > > > consequence HAProxy times out waiting for the kernel buffer to clear. > > > > Thus you might have very short timeouts! Usually it's not supposed to > > be an issue. > > I wouldn't say they are "small": > ~~~~ > timeout server 60s > timeout server-fin 6s > timeout client 30s > timeout client-fin 6s > timeout tunnel 180s > timeout connect 6s > timeout queue 30s > timeout check 6s > timeout tarpit 30s > ~~~~ > > As seen the timeout which I believe is the culprit is the `timeout > client 30s` which I guess is quite enough.
It's enough for a 2 Mbps bandwidth on the client, not for less. I don't see the point is setting too short timeouts on the client side for data transfers, I tend to consider that if the response starts to be sent, then the most expensive part was done and it'd better be completed otherwise the client will try again and inflict the same cost to the server again. You should probably increase this enough so that you don't see unexpected timeouts anymore, and rely on tcp-ut to cut early if a client doesn't read the data. Willy

