On Sun, Sep 30, 2018 at 10:16:55PM +0200, PiBa-NL wrote:
> Hi Willy,
> Op 30-9-2018 om 20:38 schreef Willy Tarreau:
> > On Sun, Sep 30, 2018 at 08:22:23PM +0200, Willy Tarreau wrote:
> > > On Sun, Sep 30, 2018 at 07:59:34PM +0200, PiBa-NL wrote:
> > > > Indeed it works with 1.8, so in that regard i 'think' the test itself is
> > > > correct.. Also when disabling threads, or running only 1 client, it 
> > > > still
> > > > works.. Then both CumConns CumReq show 11 for the first stats result.
> > > Hmmm for me it fails even without threads. That was the first thing I
> > > tried when meeting the error in fact. But I need to dig deeper.
> > So I'm seeing that in fact the count is correct if the server connection
> > closes first, and wrong otherwise. In fact it fails similarly both for
> > 1.6, 1.7, 1.8 and 1.9 with and without threads. I'm seeing that the
> > connection count is exactly 10 times the incoming connections while the
> > request count is exactly 20 times this count. I suspect that what happens
> > is that the request count is increased on each connection when preparing
> > to receive a new request. This even slightly reminds me something but
> > I don't know where I noticed something like this, I think I saw this
> > when reviewing the changes needed to be made to HTTP for the native
> > internal representation.
> > 
> > So I think it's a minor bug, but not a regression.
> > 
> > Thanks,
> > Willy
> 
> Not sure, only difference between 100x FAILED and 100x OK is the version
> here. Command executed and result below.
> 
> Perhaps that's just because of the OS / Scheduler used though, i assume your
> using some linux distro to test with, perhaps that explains part of the
> differences between your and my results..

I find this strange. Your config contains a comment about the length
converter missing from 1.8 so I had to change it to use the deny part
on 1.8. It happens that using deny here precisely is what fixed the
problem for me the first time. I simplified it this way to run a
manual test :

  global
    stats socket /tmp/sock1 mode 666 level admin
    #nbthread 3
    log 127.0.0.1:5514 local0
    #nokqueue

  defaults
    mode http
    option dontlog-normal
    log global
    option httplog
    timeout connect         3s
    timeout client          4s
    timeout server          15s

  frontend fe1
    bind 127.0.0.1:8001
    acl donelooping hdr(TEST) -m len 10
    http-request set-header TEST "%[hdr(TEST)]x"
    use_backend b2 if donelooping
    default_backend b1

  backend b1
    server srv1 127.0.0.1:8001

  frontend fe2
    bind 127.0.0.1:8002
    default_backend b2

  backend b2
    server srv2 127.0.0.1:8000

Then I test it this way and got the same results on all versions :

  $ echo -e "GET / HTTP/1.1\r\n\r\n"|nc 0 8001
  $ echo show info | socat - /tmp/sock1 | grep Cum
  CumConns: 11
  CumReq: 21
  CumSslConns: 0

  $ echo -e "GET / HTTP/1.1\r\nconnection: close\r\n\r\n"|nc 0 8001
  $ echo show info | socat - /tmp/sock1 | grep Cum
  CumConns: 11
  CumReq: 11
  CumSslConns: 0

Regards,
Willy

Reply via email to