Re: Higher Tc than timeout server

2022-07-16 Thread Willy Tarreau
Hi William,

On Sat, Jul 16, 2022 at 06:43:09PM +0200, William Edwards wrote:
> Hi,
> 
> Sorry to bump this, but I haven't made any progress with this on my own.
> Does anyone see what I'm missing here?
> 
> > The Tc timer is documented as:
> > 
> > > - Tc: total time to establish the TCP connection to the server. It's
> > > the time
> > >   elapsed between the moment the proxy sent the connection request,
> > > and the
> > >   moment it was acknowledged by the server, or between the TCP SYN
> > > packet and
> > >   the matching SYN/ACK packet in return. The value "-1" means that the
> > >   connection never established.
> > 
> > The `timeout server` option is documented as:
> > 
> > > The inactivity timeout applies when the server is expected to
> > > acknowledge or
> > > send data.
> > 
> > However, I have a few connections with a higher Tc than `timeout
> > server` (5m), e.g.:
> > 
> > May 25 20:15:33 admin-msh haproxy[1015]: :::127.0.0.1:33406
> > [25/May/2022:03:18:44.905] redis
> > redis/http-msh02.efw.ha.cyberfusion.cloud 1/0/61008353 87670 --
> > 134/113/112/112/0 0/0
> > 
> > Shouldn't the `timeout server` have closed the connection with the sD
> > termination state after 5m if it took 61008353 ms for the server to
> > acknowledge the connection request? Or, more likely, am I misreading
> > the documentation?

Here you're using TCP logs so the timer you're seeing is the total
connection life time from connect to close. The connect time was
zero.

In addition to this, "timeout server" doesn't affect the connect timeout,
only the transfers. It's "timeout connect" which affects the connect
timeout.

Hoping this helps,
Willy



Re: Higher Tc than timeout server

2022-07-16 Thread William Edwards

Hi,

Sorry to bump this, but I haven't made any progress with this on my own. 
Does anyone see what I'm missing here?


William Edwards schreef op 2022-05-26 12:10:

Hi,

The Tc timer is documented as:

- Tc: total time to establish the TCP connection to the server. It's 
the time
  elapsed between the moment the proxy sent the connection request, 
and the
  moment it was acknowledged by the server, or between the TCP SYN 
packet and

  the matching SYN/ACK packet in return. The value "-1" means that the
  connection never established.


The `timeout server` option is documented as:

The inactivity timeout applies when the server is expected to 
acknowledge or

send data.


However, I have a few connections with a higher Tc than `timeout
server` (5m), e.g.:

May 25 20:15:33 admin-msh haproxy[1015]: :::127.0.0.1:33406
[25/May/2022:03:18:44.905] redis
redis/http-msh02.efw.ha.cyberfusion.cloud 1/0/61008353 87670 --
134/113/112/112/0 0/0

Shouldn't the `timeout server` have closed the connection with the sD
termination state after 5m if it took 61008353 ms for the server to
acknowledge the connection request? Or, more likely, am I misreading
the documentation?

Full config is attached. Used HAProxy version is 2.2.9-2.


--
With kind regards,

William Edwards




Higher Tc than timeout server

2022-05-26 Thread William Edwards

Hi,

The Tc timer is documented as:

- Tc: total time to establish the TCP connection to the server. It's 
the time
  elapsed between the moment the proxy sent the connection request, and 
the
  moment it was acknowledged by the server, or between the TCP SYN 
packet and

  the matching SYN/ACK packet in return. The value "-1" means that the
  connection never established.


The `timeout server` option is documented as:

The inactivity timeout applies when the server is expected to 
acknowledge or

send data.


However, I have a few connections with a higher Tc than `timeout server` 
(5m), e.g.:


May 25 20:15:33 admin-msh haproxy[1015]: :::127.0.0.1:33406 
[25/May/2022:03:18:44.905] redis 
redis/http-msh02.efw.ha.cyberfusion.cloud 1/0/61008353 87670 -- 
134/113/112/112/0 0/0


Shouldn't the `timeout server` have closed the connection with the sD 
termination state after 5m if it took 61008353 ms for the server to 
acknowledge the connection request? Or, more likely, am I misreading the 
documentation?


Full config is attached. Used HAProxy version is 2.2.9-2.

--
With kind regards,

William Edwardsglobal
  log /dev/log local0
  log /dev/log local1 notice

  stats socket /var/run/haproxy-admin-1.sock level admin process 1 mode 660 
group root
  stats timeout 30s

  user haproxy
  group haproxy
  daemon

  nbproc 1
  nbthread 6
  cpu-map auto:1/1-6 0-5

defaults
  log global
  mode tcp
  option httplog
  option dontlognull

  timeout connect 5000
  timeout client 5m
  timeout server 5m
  timeout tunnel 1h

listen redis
  bind :::6380 v4v6
  mode tcp
  balance source
  option tcplog
  option tcpka
  server http-msh02.efw.ha.cyberfusion.cloud fc00:b6d:cfc:4::11:6379 check 
agent-check agent-inter 5000 agent-port 60413