httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plüm, Rüdiger, VF-Group" <ruediger.pl...@vodafone.com>
Subject RE: prefetch proxy
Date Wed, 02 Nov 2011 11:40:08 GMT
 

> -----Original Message-----
> From: Jim Jagielski [mailto:jim@jaguNET.com] 
> Sent: Mittwoch, 2. November 2011 12:22
> To: dev@httpd.apache.org
> Subject: Re: prefetch proxy
> 
> 
> On Nov 2, 2011, at 5:44 AM, Rüdiger Plüm wrote:
> 
> > 
> > 
> > Am 01.11.2011 21:23, schrieb Jim Jagielski:
> >> In mod_proxy_http we have:
> >> 
> >>     /* Prefetch MAX_MEM_SPOOL bytes
> >>      *
> >>      * This helps us avoid any election of C-L v.s. T-E
> >>      * request bodies, since we are willing to keep in
> >>      * memory this much data, in any case.  This gives
> >>      * us an instant C-L election if the body is of some
> >>      * reasonable size.
> >>      */
> >>     temp_brigade = apr_brigade_create(p, bucket_alloc);
> >>     do {
> >>         status = ap_get_brigade(r->input_filters, temp_brigade,
> >>                                 AP_MODE_READBYTES, APR_BLOCK_READ,
> >>                                 MAX_MEM_SPOOL - bytes_read);
> >>         if (status != APR_SUCCESS) {
> >>             ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
> >>                          "proxy: prefetch request body 
> failed to %pI (%s)"
> >>                          " from %s (%s)",
> >>                          p_conn->addr, p_conn->hostname ? 
> p_conn->hostname: "",
> >>                          c->remote_ip, c->remote_host ? 
> c->remote_host: "");
> >>             return HTTP_BAD_REQUEST;
> >>         }
> >> 
> >>         apr_brigade_length(temp_brigade, 1,&bytes);
> >>         bytes_read += bytes;
> >> 
> >> However, I see times when status could be APR_EAGAIN. IMO, 
> it doesn't
> >> make sense to error out here in that case. Right?
> > 
> > Why should it be EAGAIN with a blocking read?
> > 
> 
> Or a Timeout... With Fed14, I'm seeing occasional 'Resource 
> temporarily unavailable'
> errors, which I think we should be able to handle.
> 
> 

I think a timeout should be handled like it is now as failing on
a slow client is IMHO a desired action by the admin. If he wants to give
the client more time he should configure a higher timeout.
For other errors like 'Resource temporarily unavailable' we should log and possibly
retry. But the question is: Why does this error happen in the first place?
What is the root cause of it and what can be done to remove it?
Is this error something that can just happen and we should gracefully live
with by retrying? And if we are retrying how often do we do this to avoid an endless loop?


Regards

Rüdiger

Mime
View raw message