httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Estrade>
Subject Re: mod_proxy + mod_cache problem, loosing EOS bucket
Date Mon, 23 Sep 2002 10:32:02 GMT
Hi again,

the problem seems to be in the proxy.

When proxy read the data and pass it to output filter, it do:

while (ap_get_brigade){



si if the data aren't read by only one brigade, the mod_cache can't work.
because it will try to cache only the first brigade with a part of data.

Do you think it's better to modify how proxy is passing data to the 
or to modify the way mod_cache is getting his data from bucket_brigade ?


Matthieu Estrade wrote:

> Hi,
> i'am working on mod_cache and mod_mem_cache + mod_proxy
> i found a problem with EOS Bucket.
> mod_cache is inserting his cache_in filter in output_filter when he 
> wants to insert data in the cache.
> when mod_cache is used with mod_proxy, the cache_in filter is called 
> after mod_proxy call ap_pass_brigade in the 
> ap_proxy_http_process_response, after received data from backend server.
> when i do test on a website, sometimes, i can see my file is not 
> cached because length > MaxStreamingBuffer.
> when i put a debug on the MaxStreamingBuffer value, i always get 0 
> even if i setup in my httpd.conf another value with 
> CacheMaxStreamingBuffer.
> So maybe a first bug here.
> But the problem doesn't come from this bug.
> When i process my test, i can see that some files are not cached 
> because of this error, so i put debug in the function calculating the 
> length of data to be cached in mod_cache.
> And something really strange happen, strange for me, but maybe not for 
> you....
> what happen:
> look if bucket is eos, if yes, exit with all_bucket_here=1
> or: look if bucket is flush, if yes, exit with unresolved_length=1
> or: size += e->length;
> }
> on the file not cached because the MaxStreamingBuffer error, the code 
> above never detect a EOS bucket, so, it return a size to the following 
> code:
> if (!all_bucket_here){
> if (unresolved_length || size > MaxStreamingBuffer)
> exit with MaxStreamingBuffer Error.
> }
> Where it's really strange, is i put a debug in mod_proxy, when it 
> receive the data from backend server, and before passing the brigade 
> to the output_filter, i can detect a EOS Bucket.
> So, i have a EOS Bucket found in the brigade mod_proxy will pass to 
> output_filter, and in the filter reading the same brigade in mod_cache 
> (cache_in filter), i can't find this same EOS Bucket.
> if someone have an idea :)
> i will continue to search on that.
> Best regards,
> Estrade Matthieu

View raw message