httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Terbush" <>
Subject [PATCH] FW: Bug in AB and patch to fix it.
Date Sun, 02 May 1999 12:23:22 GMT

-----Original Message-----
From: Alejandro Forero []
Sent: Saturday, May 01, 1999 8:53 PM
Subject: Bug in AB and patch to fix it.

Hi. :)

The guys at ZDNet downloaded one CGI application I made and told me
had been testing it but it was failing to report things correctly.
said that when they made 1000 requests with a concurrency of 100
simultaneous requests, my CGI application reported to have received
hits. I, who didn't know of AB then, did my own script to test it and
didn't found any problems. I mailed them back asking them, among many
other things, what program they were using for their tests. The Apache
benchmarking tool.

I got it and tried it. I found there was an error on it:

% ab -c 100 -n 1000 http://localhost/fffff >/dev/null
% grep -c ffffff ~web/logs/error_log

Oh. So I tell it to do 1000 requests but it does 1083. There is an

I took a look at the code and I hacked the function write_request,
a counter for the number of requests made, so it won't make any
more than I told it to make. I am not sure what happens when requests
out or a connection is suddenly closed before the request is
completed. If
AB's current policy is to retry failed attempts, my current hack may
introduce another bug (AB would hang if an attempt times out) and you
will want to code a solution your selves.

Anyway, you may take a look at the little patch I am attaching, which
fixes that bug which made the ZD guys think my Pollera CGI application
buggy. ;)


"I am enough of an artist to draw freely upon my imagination.
is more important than knowledge. Knowledge is limited. Imagination
encircles the world." Albert Einstein.

View raw message