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
Thank you for the report. The bug should be fixed with r1911291 in trunk and I'll propose this to backport to 2.4.x. The double counting of transferred bytes had already been fixed in a previous change and is part of 2.4.x already.
Thanks for your answer. Both issues are fixed for me in trunk, but in 2.4.x I also get doubled bytes.
Just so that I get that correctly: you see double bytes in 2.4.x with r1911291 applied there?
Sorry, maybe I messed up something or didn't clean everything before rebuilding. With the patch applied it works correctly. Thanks again.
Wonderful and thanks for the update! I was starting to doubt my testcases.;)
This was backported in 2.4.x branch in r1911858 and is part of version 2.4.58.