Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 92623 invoked from network); 26 Feb 2007 20:07:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2007 20:07:02 -0000 Received: (qmail 42418 invoked by uid 500); 26 Feb 2007 20:07:00 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 42314 invoked by uid 500); 26 Feb 2007 20:07:00 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 42281 invoked by uid 99); 26 Feb 2007 20:07:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Feb 2007 12:07:00 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [206.123.111.90] (HELO mail.loukasmgmt.com) (206.123.111.90) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Feb 2007 12:06:48 -0800 Received: (qmail 24630 invoked by uid 510); 26 Feb 2007 14:06:25 -0600 Received: from unknown (HELO ?192.168.0.101?) (smtp@loukasmgmt.com@24.9.181.215) by mail.loukasmgmt.com with SMTP; 26 Feb 2007 14:06:25 -0600 Message-ID: <45E33DB6.1040707@hanik.com> Date: Mon, 26 Feb 2007 13:06:14 -0700 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Small patch to ab apr_socket_recv error handling Content-Type: multipart/mixed; boundary="------------080102010201060607040507" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------080102010201060607040507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------080102010201060607040507 Content-Type: text/plain; name="fix-ab-recv-error.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix-ab-recv-error.patch" 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; } } --------------080102010201060607040507--