To do some load testing, for my own curiosity, on my server I ran:
ab -kc 50 -t 200 http://localhost/index.php
This opens up 50 keep-alive
To describe the issue in other words:
The apache benchmarking tool (ab) assumes that length of response content will be the same during entire test. It stores the content length of the first response. If any of further responses have different content length, they result in "length failures".
Following apache bug report seems to confirm that: ASF Bug 42040
Summary: If you are serving any content of variable length, you should probably ignore this kind of ab request failures.
Edit: I have recently noticed that the ab command has a new (at least for me) option:
-l Accept variable document length (use this for dynamic pages)
I can see it in ab Version 2.3 <$Revision: 1528965 $> but can't see it in ab Version 2.3 <$Revision: 655654 $>, so it was probably added relatively recently.