You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Torsten Foertsch <to...@gmx.net> on 2007/04/19 12:11:27 UTC

[users@httpd] mod_proxy_html is filling error_log

Hi,

I am trying to deploy mod_proxy_html-2.5.2 with a httpd 2.2.3 but it fills my 
error_log with messages like:

[Thu Apr 19 08:42:50 2007] [error] [client 192.168.254.25] Error in bucket 
read

The reason for this message lies in the following part of the code, I think.

    if ( APR_BUCKET_IS_EOS(b) ) {
...
    } else if ( ! APR_BUCKET_IS_METADATA(b) &&
		apr_bucket_read(b, &buf, &bytes, APR_BLOCK_READ)
              == APR_SUCCESS ) {
...
    } else {
      ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, "Error in bucket read") ;
    }

The "else if" fails if APR_BUCKET_IS_METADATA(b) is true or if there was an 
error in bucket read. So, I think there are metadata buckets that cause the 
ap_log_error.

The development version of mod_proxy_html reads a bit different:

    if ( APR_BUCKET_IS_EOS(b) ) {
...
    } else if ( apr_bucket_read(b, &buf, &bytes, APR_BLOCK_READ)
	      == APR_SUCCESS ) {
...
    } else {
      ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, "Error in bucket read") ;
    }

So, what is appropriate for 2.5.2? Is it

a) like 3.0 or rather

b)
    if ( APR_BUCKET_IS_EOS(b) ) {
...
    } else if ( APR_BUCKET_IS_METADATA(b) ) {
      /* do something special for metadata buckets */
    } else if ( apr_bucket_read(b, &buf, &bytes, APR_BLOCK_READ)
              == APR_SUCCESS ) {
...
    } else {
      ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, "Error in bucket read") ;
    }

or is it

c)
    if ( APR_BUCKET_IS_EOS(b) ) {
...
    } else if ( ! APR_BUCKET_IS_METADATA(b) &&
		apr_bucket_read(b, &buf, &bytes, APR_BLOCK_READ)
              == APR_SUCCESS ) {
...
    } else if ( ! APR_BUCKET_IS_METADATA(b) ) {
      ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, "Error in bucket read") ;
    }

In case a) metadata buckets are handled by the same code as normal buckets. In 
case b) they get special treatment and in case c) they are simply lost.

What is right?

If b), what kind of handling is needed?

Thanks,
Torsten Förtsch

Re: [users@httpd] mod_proxy_html is filling error_log

Posted by Torsten Foertsch <to...@gmx.net>.
On Thursday 19 April 2007 12:11, Torsten Foertsch wrote:
> What is right?

Or would it be better to try the development version?

Torsten

Re: [users@httpd] mod_proxy_html is filling error_log

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 19 Apr 2007 12:11:27 +0200
Torsten Foertsch <to...@gmx.net> wrote:


> [Thu Apr 19 08:42:50 2007] [error] [client 192.168.254.25] Error in
> bucket read

Yes, that's a minor bug in 2.5.2. with Apache 2.2.  There's a fix
but I haven't got around to releasing it as a version.

> The development version of mod_proxy_html reads a bit different:
> 
>     if ( APR_BUCKET_IS_EOS(b) ) {
> ...
>     } else if ( apr_bucket_read(b, &buf, &bytes, APR_BLOCK_READ)
> 	      == APR_SUCCESS ) {
> ...
>     } else {
>       ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, "Error in bucket
> read") ; }

Erk!  So it does.  I thought that had been properly updated.

> b)
> c)

Either of those is OK.  Technically (b) is probably more correct.

> If b), what kind of handling is needed?

In principle, a flush bucket becomes an ap_fflush.  But that's fuzzy,
because there'll be a small amount of data buffered in the HTMLparser
which *can't* be flushed.  So it'll need careful testing.  And so long
as mod_proxy is feeding us HTML, it's not really important.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org