Hello, I use apache 2.0.52 on some Sun Solaris 9 (sparc) and Linux (gentoo 2-6.x) Boxes as a proxy-server. In case of reducing network traffic i'd like to use the disk cache functionality. The Problem is ( i saw it on every 2.0.x (>30) release i tested ), if mod_disk_cache is used, the first time i show up a web page it is displayed correctly. The second / third time i display the same page, some pictures / style sheet's and sometimes even the whole page is missing. If httpd is run in a truss, is see, if it likes to open the disk cache it couldn't find the files, it thinks it has cached before... 259: open("/var/httpd-proxy/proxycache/NEf/Fin/YMI/kW1/7zJ/KcGRYcg.data", O_RDONLY) Err#2 ENOENT In the apache-error logfile i see following message: [Thu Sep 30 13:14:36 2004] [debug] mod_disk_cache.c(400): disk_cache: Recalled cached URL info header www.macomm.dehttp://www.macomm.de/gfx/bottom.gif? [Thu Sep 30 13:14:36 2004] [debug] mod_disk_cache.c(464): disk_cache: Recalled headers for URL www.macomm.dehttp://www.macomm.de/gfx/bottom.gif? [Thu Sep 30 13:14:36 2004] [info] [client 10.104.8.226] Module bug? Request filename is missing for URI http://www.macomm.de/gfx/bottom.gif, referer: http://www.macomm.de/racing-1.html [Thu Sep 30 13:14:36 2004] [error] [client 10.104.8.226] File does not exist: (null), referer: http://www.macomm.de/racing-1.html I don't know what can be wrong there. What is saw is, cached pages are stored on disk very late. What i mean is, i request a page, see it completely downloaded in my browser, but it isn't stored on the disk cache. Some times later (maybe 10 seconds, 30 seconds) it is sotred on the disk cache... I have no idea what can be wrong there. But this prevents me implementing proxy disk cache in my servers. maybe someone can have a look for it.
See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30278, yours bug is just a duplicate I think
(In reply to comment #1) > See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30278, yours bug is just a > duplicate I think unfortunatly no. Bug No. 30278 has the problem, that a page, that was cached is transferred with wrong content header (e. g. "text/plain; charset=UTF-8" instead of "text/css"). The Bug i describe is, that a page can't be transferred, because the cached file ( or the file mod_disk_cache "thinks" ) is not found on the local filesystem. (Err#2 ENOENT)
Looking at the code, I see no way for this set of conditions to happen within mod_disk_cache by itself. If you look at modules/experimental/mod_disk_cache.c:343 in the httpd-2.0.52 tarball, you will see that if an open call fails, it will generate a DECLINED response. This will cause mod_disk_cache to try to save the response, but not serve from the cache page. Are you sure that the hash file that is ENOENT on open() corresponds to that URL? (http://www.macomm.de/gfx/bottom.gif should correspond to something like 'Y9/1v/kx/IeVeco@1i0tZ6YQg.data') What is the exact configuration syntax for mod_disk_cache you are using? Your truss/strace output has three-character directory hashes which isn't standard, so what else are you specifying. Are you using mod_proxy? What is the configuration you are using there? What client are you using to request the data? Can you capture the specific HTTP request? (including the first page that works, then all subsequent errors.) Do note that mod_cache was completely rewritten and included in 2.0.52 as we know the caching did not work in any prior release. So, any analysis or traces before 2.0.52 would be useless now. (And, 2.1.3 has the best available caching modules, but most of the functionality and fixes in 2.1.3 should be present in 2.0.52.)
Hi, actual i upgraded to 2.0.53 a view weeks ago, and now i'm testing the proxy disk caching for this time period. I can say, since the upgrade i can't reproduce this problem, and caching seems to work very well - thats good! Every problem i saw before has gone... So an upgrade to 2.0.53 seems to fix this problem. Michael.
Resolving as fixed since the reporter said 2.0.53 works.