What does Apache Bench consider a failure?

1.7k views Asked by At

I have been using Apache Bench in work to benchmark a number of servers. After testing one of them I got this result:

Concurrency Level:      10
Time taken for tests:   13.564 seconds
Complete requests:      500
Failed requests:        497
(Connect: 0, Length: 497, Exceptions: 0)

There is no sign of an error in the server's log file. This makes me believe that it is Apache Bench that is treating successful requests as fails. With that in mind, can anyone explain to me what does Apache Bench considers a failed request?

2

There are 2 answers

0
ᴇʟᴇvᴀтᴇ On BEST ANSWER

Apache Bench marks a response as a failure if the actual response length doesn't match the byte count stated in the response header.

Possible duplicate of: investigating apache benchmark failed request

0
user1016759 On

Apache bench seems to consider it a failed transaction even if the byte count of the body and the Content-Length header match, IF the same URI returns a variable length body on each request.