DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27791>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27791

mod_cache doesn't re-cache expired content





------- Additional Comments From [EMAIL PROTECTED]  2004-06-07 17:20 -------
I may have rejoyced a little to quickly there...

The problem was mostly fixed by the patch provided. Unfortunately, there seems 
to be another problem.

On a reverse proxy, centuri, we have both disk cache and mem cache activated. 
The memory cache activated first and is only supposed to cache elements of size 
smaller than 10,000 bytes. The disk cache takes care of anything not cached by 
the memory cache.

Somehow, at one point a file of size smaller than 10,000 bytes ends up being 
cached by the disk cache. Don't ask me why (maybe the mem cache was filled up 
and the element ended up on disk?) - it's beyond the point. Eventually, the 
file in disk cache ends up stale. At than point, when the element (style.css) 
is requested, the disk cache responds that it is stale and a proxy request is 
issued to the backend server. The fresh element ends up being cached in memory, 
and the stale entry remains in the disk cache...

The logs below should clearly show what happens. mod_disk_cache does not appear 
to log the element as stale, but I know that the disk cache contains a stale 
copy of styles.css because I looked it up. Removing the element from the disk 
cache also removes the symptoms.

Please find below the log trace of two requests for the same element style.css 
on the reverse proxy centuri:3080. The backend server is backend:7010. The two 
requests are separated by some CRs.

[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(66): proxy: HTTP: 
canonicalising URL //centuri:3080/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] mod_proxy.c(416): Trying to run 
scheme_handler
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(1042): proxy: HTTP: serving URL 
http://centuri:3080/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(178): proxy: HTTP connecting 
http://centuri:3080/html/styles.css to centuri.gsi.fr:3080
[Mon Jun 07 08:48:57 2004] [debug] proxy_util.c(1160): proxy: HTTP: fam 2 
socket created to connect to centuri
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(327): proxy: socket is connected
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(361): proxy: connection 
complete to 150.175.10.189:3080 (centuri)
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(344): cache: stale cache - test 
conditional
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(391): cache: nonconditional - no 
cached etag/lastmods - add cache_in and DECLINE
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(66): proxy: HTTP: 
canonicalising URL //backend:7010/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] mod_proxy.c(416): Trying to run 
scheme_handler
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(1042): proxy: HTTP: serving URL 
http://backend:7010/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(178): proxy: HTTP connecting 
http://backend:7010/html/styles.css to backend:7010
[Mon Jun 07 08:48:57 2004] [debug] proxy_util.c(1160): proxy: HTTP: fam 2 
socket created to connect to backend
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(327): proxy: socket is connected
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(361): proxy: connection 
complete to backend:7010 (backend)
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(877): proxy: start body send
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(532): cache: running CACHE_IN 
filter
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(790): cache: Caching 
url: /html/styles.css
[Mon Jun 07 08:48:57 2004] [info] mem_cache: Cached url: 
centuri/html/styles.css?
[Mon Jun 07 08:48:57 2004] [debug] mod_headers.c(521): headers: 
ap_headers_output_filter()
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(936): proxy: end body send
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(877): proxy: start body send
[Mon Jun 07 08:48:57 2004] [debug] mod_headers.c(521): headers: 
ap_headers_output_filter()
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(936): proxy: end body send


[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(66): proxy: HTTP: 
canonicalising URL //centuri:3080/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] mod_proxy.c(416): Trying to run 
scheme_handler
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(1042): proxy: HTTP: serving URL 
http://centuri:3080/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(178): proxy: HTTP connecting 
http://centuri:3080/html/styles.css to centuri.gsi.fr:3080
[Mon Jun 07 08:48:57 2004] [debug] proxy_util.c(1160): proxy: HTTP: fam 2 
socket created to connect to centuri
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(327): proxy: socket is connected
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(361): proxy: connection 
complete to 150.175.10.189:3080 (centuri)
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(344): cache: stale cache - test 
conditional
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(391): cache: nonconditional - no 
cached etag/lastmods - add cache_in and DECLINE
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(66): proxy: HTTP: 
canonicalising URL //backend:7010/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] mod_proxy.c(416): Trying to run 
scheme_handler
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(1042): proxy: HTTP: serving URL 
http://backend:7010/html/styles.css
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(178): proxy: HTTP connecting 
http://backend:7010/html/styles.css to backend:7010
[Mon Jun 07 08:48:57 2004] [debug] proxy_util.c(1160): proxy: HTTP: fam 2 
socket created to connect to backend
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(327): proxy: socket is connected
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(361): proxy: connection 
complete to backend:7010 (backend)
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(877): proxy: start body send
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(532): cache: running CACHE_IN 
filter
[Mon Jun 07 08:48:57 2004] [debug] mod_cache.c(790): cache: Caching 
url: /html/styles.css
[Mon Jun 07 08:48:57 2004] [info] mem_cache: Cached url: 
centuri/html/styles.css?
[Mon Jun 07 08:48:57 2004] [debug] mod_headers.c(521): headers: 
ap_headers_output_filter()
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(936): proxy: end body send
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(877): proxy: start body send
[Mon Jun 07 08:48:57 2004] [debug] mod_headers.c(521): headers: 
ap_headers_output_filter()
[Mon Jun 07 08:48:57 2004] [debug] proxy_http.c(936): proxy: end body send


And the cache configuration:

            MCacheMaxObjectSize 10000
            MCacheSize          70000
            CacheEnable         mem /

            CacheRoot           /apache/cache
            CacheSize           150000
            CacheEnable         disk /

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to