Apache shouldn't be prematurely disconnecting sockets in the middle of a response unless there is a serious problem (Eg. the Apache child process is crashing). Could you describe how to reproduce this?
As for the patch, could you make this configurable with a command-line option? That way the current functionality can stay default (meaning, all recv() errors are fatal) and for those circumstances where the user knows that there is some network-level or Apache-level problem causing intermittent recv() errors, they can still get performance results out of AB. -aaron On Mon, Feb 26, 2007 at 01:06:14PM -0700, Filip Hanik - Dev Lists wrote: > I've created a small patch that lets ab continue even if it encounters > an error on apr_socket_recv > > quite commonly, when servers are overloaded they disconnect the socket, > ab receives a 104 (connection reset by peer) and the ab test exits. > > This patch logs the error, both counters correctly, cleans up the > connection and continues. > > thoughts? > > Filip > Index: ab.c > =================================================================== > --- ab.c (revision 511976) > +++ ab.c (working copy) > @@ -1332,7 +1332,10 @@ > err_except++; /* XXX: is this the right error counter? */ > /* XXX: Should errors here be fatal, or should we allow a > * certain number of them before completely failing? -aaron */ > - apr_err("apr_socket_recv", status); > + //apr_err("apr_socket_recv", status); > + bad++; > + close_connection(c); > + return; > } > } >