Bug 55646 - non-2xx responses are not considered errors
Summary: non-2xx responses are not considered errors
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: support (show other bugs)
Version: 2.5-HEAD
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2013-10-10 10:02 UTC by Chris Wilson (Aptivate)
Modified: 2013-10-10 11:41 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Wilson (Aptivate) 2013-10-10 10:02:57 UTC
$ ab -X localhost:3128 -n 10 -c 3 http://www.mirrorservice.org/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.mirrorservice.org [through localhost:3128] (be patient).....done

Server Software:        squid/3.1.19
Server Hostname:        www.mirrorservice.org
Server Port:            80

Document Path:          /
Document Length:        3140 bytes

Concurrency Level:      3
Time taken for tests:   0.165 seconds
Complete requests:      10
Failed requests:        2
   (Connect: 0, Receive: 0, Length: 2, Exceptions: 0)
Write errors:           0
Non-2xx responses:      8
Total transferred:      34998 bytes
HTML transferred:       31566 bytes
Requests per second:    60.66 [#/sec] (mean)
Time per request:       49.458 [ms] (mean)
Time per request:       16.486 [ms] (mean, across all concurrent requests)
Transfer rate:          207.31 [Kbytes/sec] received

The "non-2xx responses" in this case are 403 errors from the proxy. I'm very surprised that these aren't considered "Failed requests", while a 200 OK response with a different length is considered "failed". Other people are surprised by this too:

* http://stackoverflow.com/questions/579450/load-testing-with-ab-fake-failed-requests-length#comment-24011206
* https://issues.apache.org/bugzilla/show_bug.cgi?id=42040

Please would you consider changing this, so that non-2xx responses are errors but different length responses are not? (or at least optionally so.)

I know that issue #42040 and friends are about adding a flag which makes different length responses be not considered as errors; I think this should be on by default, and the option should be to turn it off and require all responses to be the same length. Thanks!
Comment 1 Eric Covener 2013-10-10 11:19:54 UTC
What's the benefit of folding some HTTP error codes into the count of failed requests if they're both already summarized separately? To avoid somoene from casually seeing "failed = 0" and moving on?

(There are already reports open for the variable length part, I'd suggest editing this PR title to be dedicated to the failed/non2xx.)
Comment 2 Yann Ylavic 2013-10-10 11:28:49 UTC
Disabling length check is a duplicate of Bug 27888 and has been backported in r1528053.

Handling non-2xx as error is quite application specific, and would need to be able to configure the failing status codes.
Comment 3 Yann Ylavic 2013-10-10 11:41:23 UTC
I'm "not permitted" to post comment on httpd-1.3 Bug 27888 directly, so I try here...

Is it still Bug 27888 WONTFIX since a backport to 2.4;x exists ?