https://bz.apache.org/bugzilla/show_bug.cgi?id=66801

            Bug ID: 66801
           Summary: Numbers reported by mod_status /server-status are
                    doubled for HTTP/2 requests
           Product: Apache httpd-2
           Version: 2.4.57
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_http2
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

When we enabled HTTP/2 on our servers, we noticed that Apache volume and
requests (as reported by /server-status from mod_status) nearly doubled. It
turned out that all HTTP/2 requests are counted twice, both for number of
requests and volume. Reproduced with local server:

# get 1G large file

$ apachectl restart
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)" 
Total Accesses: 0
Total kBytes: 0
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 1 # server-status is also a request
Total kBytes: 1
$ mkfile 1g /var/www/1g.bin
$ curl -o /dev/null -k https://localhost:8443/1g.bin                           
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1024M  100 1024M    0     0   732M      0  0:00:01  0:00:01 --:--:--  736M
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 4
Total kBytes: 2097731
$ curl -o /dev/null -k https://localhost:8443/1g.bin                           
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1024M  100 1024M    0     0   740M      0  0:00:01  0:00:01 --:--:--  743M
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 7
Total kBytes: 4195461

# try with multiple 1M files

$ apachectl restart
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 0
Total kBytes: 0
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 1
Total kBytes: 1
$ mkfile 1m /var/www/1m.bin
$ h2load -c 10 -n 1000 https://localhost:8443/1m.bin > /dev/null
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 2002
Total kBytes: 2048615

# try with HTTP/1.1, numbers are correct here

$ apachectl restart
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 0
Total kBytes: 0
$ h2load --h1 -c 10 -n 1000 https://localhost:8443/1m.bin > /dev/null          
$ curl -s "http://localhost:8080/server-status?auto"; | grep -E "Total (Acc|kB)"
Total Accesses: 1001
Total kBytes: 1024001

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to