httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject RE: apache 2 disk-cache SEGV
Date Thu, 01 Aug 2002 12:52:49 GMT
mod_mem_cache fomr HEAD should work. mod_disk_cache is still broken.

Try a config like this:

LoadModule cache_module modules/mod_cache.so
<IfModule mod_cache.c>
   CacheOn On
#  CacheMaxExpire 2
#  CacheDefaultExpire 1
   LoadModule mem_cache_module modules/mod_mem_cache.so
   <IfModule mod_mem_cache.c>
      CacheEnable mem /
      MCacheSize 4096
      MCacheMaxObjectCount 100
      MCacheMinObjectSize 1
      MCacheMaxObjectSize 1000000
#      CacheDefaultExpire 1
   </IfModule>
</IfModule>

Bill

> -----Original Message-----
> From: Eric Prud'hommeaux [mailto:eric@w3.org]
> Sent: Thursday, August 01, 2002 1:06 AM
> To: Apache HTTP server developers
> Subject: apache 2 disk-cache SEGV
>
>
> Has anybody seen --enable-disk-cache or --enable-mem-cache work under
> apache 2? In my scenario:
>  --enable-maintainer-mode --with-mpm=prefork --enable-rewrite
>  --enable-expires --enable-speling --disable-auth --enable-headers
>  --enable-info --disable-userdir --enable-dav --enable-proxy
>  --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http
>  --enable-file-cache --enable-cache --enable-disk-cache
>  --enable-mem-cache --no-create --no-recursion
>  --prefix=/usr/local/apache-2-clean
> the cache context's filename is copied to r->filename
>   cache_url_handler (modules/experimental/mod_cache.c:192)
>   cache_read_entity_headers (modules/experimental/mod_cache.c:192)
>   cache_select_url which (modules/experimental/mod_cache.c:287)
>     r->filename = apr_pstrdup(r->pool, info->filename );
> before the content_set filter sets it.
>   cache_in_filter (modules/experimental/mod_cache.c:732)
>     info->filename = apr_pstrdup(r->pool, r->filename );
>
> Can someone who has this working set breakpoints at cache_url_handler
> and cache_in_filter and let me know if they see the same behavior?
> The two are registered with
>     ap_hook_quick_handler(cache_url_handler, NULL, NULL, APR_HOOK_FIRST);
> and
>     ap_register_output_filter("CACHE_IN",
>                               cache_in_filter,
>                               NULL,
>                               AP_FTYPE_CONTENT_SET);
> "CACHE_IN" is added to the request several places in cache_url_handler (a
> bit too late) and in cache_conditional_filter, which is also added to the
> request in cache_url_handler. From this it appears that the info->filename
> will _always_ be copied to r->filename before it has been initialized.
>
> If you are replicating this problem, you will probably need to created
> the disk cache directory /usr/local/apache-2-clean/proxy (in this case).
> Otherwise, the cache is never written and so never read and so the code
> path never arises.
>
> Since this is a cache re-use issue, you'll have to GET something twice
> through the proxy in rapid enough succession that the cached copy
> doesn't go stale.
>
> For now, I just cheesed around it with
> +++ modules/experimental/mod_cache.c:287
> +    if (info->filename)
>  	r->filename = apr_pstrdup(r->pool, info->filename );
> but never having seen it work, I don't know what the intended path is.
> --
> -eric
>
> (eric@w3.org)
> Feel free to forward this message to any list for any purpose other than
> email address distribution.
>


Mime
View raw message