Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 41641 invoked from network); 31 Aug 2010 13:41:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Aug 2010 13:41:59 -0000 Received: (qmail 44004 invoked by uid 500); 31 Aug 2010 13:41:55 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 42981 invoked by uid 500); 31 Aug 2010 13:41:54 -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 42973 invoked by uid 99); 31 Aug 2010 13:41:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Aug 2010 13:41:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of trawick@gmail.com designates 209.85.160.45 as permitted sender) Received: from [209.85.160.45] (HELO mail-pw0-f45.google.com) (209.85.160.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Aug 2010 13:41:47 +0000 Received: by pwi7 with SMTP id 7so439281pwi.18 for ; Tue, 31 Aug 2010 06:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=Oinvbs+VoZxgRLbEjMdXFOWjxwCyhdwD6x866f7WBwQ=; b=GmTu0RwU7f98EswsxRjhZdt3eV6HqIIex0KLCp751Lp6BTH4GQKAXz2L+YeUSX2uTZ f44MLPPnN+vQs7H90n9Ye2KZi/afwDFbpYSa31ywmD5Xn2tBBhyRftMFSvikhHyTbqSS wvkWqDCYNBx1pdnezQcTWGxSynk3kLsDyyS50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=q//amNdgaBHDFTUZL469e1f0BLz/qNdHErasyN7WvvCdIXQp1EkEBGIQTg1cuHRD+d yxNKixRAu3QZVuRaPGkbYhAH6vjE+QNN/TZqD9teDMaIrxdVAWrvwqNt9lAIjca1/LW0 1yqMPWQJzVRTVEj2V7/+0yXEnxoTx+DdR0B0k= MIME-Version: 1.0 Received: by 10.143.6.15 with SMTP id j15mr5956198wfi.39.1283262069932; Tue, 31 Aug 2010 06:41:09 -0700 (PDT) Received: by 10.231.15.141 with HTTP; Tue, 31 Aug 2010 06:41:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 Aug 2010 09:41:09 -0400 Message-ID: Subject: Re: errors that cause proxy to move worker to error state From: Jeff Trawick To: dev@httpd.apache.org Content-Type: multipart/alternative; boundary=001636e0a732d50126048f1ebb32 --001636e0a732d50126048f1ebb32 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Aug 31, 2010 at 9:33 AM, Andrew Oliver wrote: > A 400 doesn't indicate a problem with the worker or the system behind > the proxy, it indicates a problem with the client. It could indicate that proxy is confused about what it sent though (in the presence of some mod_proxy defect). That's what bugs me about it. That doesn't seem to be a good time to keep using the connection. > Also marking a > worker bad for say a 401 unauthorized would make all authentication > impossible, a 403 or 404 would drain the pool every time someone asked > for something they weren't allowed to have or that wasn't located > where they thought it was (especially spiders like google). > Sure, other 40xs are fine. > > -Andy > > On Tue, Aug 31, 2010 at 9:26 AM, Jeff Trawick wrote: > > It looks like this is just 500 and 503. > > > > Why not 400, for example? > > > > if (access_status == OK) > > break; > > else if (access_status == HTTP_INTERNAL_SERVER_ERROR) { > > /* Unrecoverable server error. > > * We can not failover to another worker. > > * Mark the worker as unusable if member of load balancer > > */ > > if (balancer) { > > worker->s->status |= PROXY_WORKER_IN_ERROR; > > worker->s->error_time = apr_time_now(); > > } > > break; > > } > > else if (access_status == HTTP_SERVICE_UNAVAILABLE) { > > /* Recoverable server error. > > * We can failover to another worker > > * Mark the worker as unusable if member of load balancer > > */ > > if (balancer) { > > worker->s->status |= PROXY_WORKER_IN_ERROR; > > worker->s->error_time = apr_time_now(); > > } > > } > > else { > > /* Unrecoverable error. > > * Return the origin status code to the client. > > */ > > break; > > } > > > > > -- Born in Roswell... married an alien... --001636e0a732d50126048f1ebb32 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Aug 31, 2010 at 9:33 AM, Andrew Oliver <= span dir=3D"ltr"><acoliver@gmail.c= om> wrote:
A 400 doesn't indicate a problem with the worker or the system behind the proxy, it indicates a problem with the client.

It = could indicate that proxy is confused about what it sent though (in the pre= sence of some mod_proxy defect).=A0 That's what bugs me about it.=A0 Th= at doesn't seem to be a good time to keep using the connection.

=A0
=A0= Also marking a
worker bad for say a 401 unauthorized would make all authentication
impossible, a 403 or 404 would drain the pool every time someone asked
for something they weren't allowed to have or that wasn't located where they thought it was (especially spiders like google).

Sure, other 40xs are fine.


=A0

-Andy

On Tue, Aug 31, 2010 at 9:26 AM, Jeff Trawick <trawick@gmail.com> wrote:
> It looks like this is just 500 and 503.
>
> Why not 400, for example?
>
> =A0=A0=A0=A0=A0=A0=A0 if (access_status =3D=3D OK)
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break;
> =A0=A0=A0=A0=A0=A0=A0 else if (access_status =3D=3D HTTP_INTERNAL_SERV= ER_ERROR) {
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Unrecoverable server error.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * We can not failover to another = worker.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * Mark the worker as unusable if = member of load balancer
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 */
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (balancer) {
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 worker->s->status = |=3D PROXY_WORKER_IN_ERROR;
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 worker->s->error_t= ime =3D apr_time_now();
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break;
> =A0=A0=A0=A0=A0=A0=A0 }
> =A0=A0=A0=A0=A0=A0=A0 else if (access_status =3D=3D HTTP_SERVICE_UNAVA= ILABLE) {
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Recoverable server error.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * We can failover to another work= er
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * Mark the worker as unusable if = member of load balancer
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 */
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (balancer) {
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 worker->s->status = |=3D PROXY_WORKER_IN_ERROR;
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 worker->s->error_t= ime =3D apr_time_now();
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }
> =A0=A0=A0=A0=A0=A0=A0 }
> =A0=A0=A0=A0=A0=A0=A0 else {
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* Unrecoverable error.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 * Return the origin status code t= o the client.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 */
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break;
> =A0=A0=A0=A0=A0=A0=A0 }
>
>



--
Born in Ros= well... married an alien...
--001636e0a732d50126048f1ebb32--