HAProxy community

Troubleshooting cL termination cause

Hi Lukas,

I have similar problem with high ta and low tr and small bytes. that is normal http connection not tunnel mode.

I wonder if it means we have a network issue between the backend and HAproxy or the network issue between HA and clients?

From what I understand tr doesn’t include the data transferred time from Backend to client

Thanks in advance

Why do you think you have a problem and why do you think the explanation above does not apply to you?

Sometime we have quite alot of the msg below in the log files.
The data transfer time td = ta-tr and in this case it is 20038-38 = 20000 (20s). It is wait too long for just 919 bytes.

The statsus code is 200 so I guess server transfered data to HA. However the data is not transfered to client and the client already close the connection. I’m not sure if there is a network issue between our backend and HA or HA and the client

1.52.172.37:35409 [21/Sep/2019:09:36:19.708] sale_https~ xxx/api8 0/0/0/38/20038 200 919 - - cL-- 2731/1451/6/2/0 0/0 {yyy|} “GET /api/ping HTTP/2.0”

Those 20 seconds are the keep-alive timeout, just like explained in this thread and in the documentation.

I checked the configuration and see that we have “timeout client 20s”. I guess that client doesn’t ack get response and that is the reason for cL termination code and HA has no idea if client get the response. Is it right?

I moved this conversation to a new thread.

The cL termination basically means:

    c : the client-side timeout expired while waiting for the client to
        send or receive data.

    L : the proxy was still transmitting LAST data to the client while the
        server had already finished. This one is very rare as it can only
        happen when the client dies while receiving the last packets.

If this is true - the termination code is correct and there is no bug you are hitting in haproxy, then the client closed at a very specific moment (when the response from the server was fully received but the client didn’t).

It is not completely impossible that you are hitting a bug though. You will have to correlate if there are real issues with those requests, or get a complete network capture of a request like this.

thanks for the clarification. I found out that there was a problem with our server and it affect the data transfer time between HA and backend and HA and clients

@Tim, could explain your problem with your server please? I’m working on a possible bug with the exact same behavior. So I’m interested to have as much info as possible.

@Tim, in addition, what is your haproxy version ? Thanks

Hi cap,

Our backend sudden response so slowly due to a problem with our caching System. I observed during that time the tr is much higher than tr (tr also high though)

We are using version 2.05

Thanks