httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50317] New: Possible error in mod_cache's "Avoiding the Thundering Herd"
Date Mon, 22 Nov 2010 20:09:45 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50317

           Summary: Possible error in mod_cache's "Avoiding the Thundering
                    Herd"
           Product: Apache httpd-2
           Version: 2.2.17
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jules@neofonie.de


Created an attachment (id=26333)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26333)
Proposed fix

Hello.

I configured apache (2.2.17) as written in
http://httpd.apache.org/docs/current/mod/mod_cache.html#thunderingherd
Nevertheless, more than one request hit the backend. The Backend sends neither
a ETag nor Last-Modified header but it sends an Expires header. I took a look
into mod_cache and made the attached patch.

The problem was in cache_storage.c:
                    irv = cache->provider->remove_url(h, r->pool);
Because of this line, there is no stale content left to serve, while getting a
newer version from the backend. There is no use in deleting this entry anyway,
because at this point, there is still interest in this url and the cache entry
will be regenerated very soon.

While investigating this, I found:
                rv = ap_cache_try_lock(conf, r, NULL);
in mod_cache.c. This seems useless, because the lockfile is already created 
in cache_util.c ap_cache_check_freshness(). Because of the NULL, it uses
the same lockfile for different URLs. I am unsure about the intention of
this second lock. 

With kind regards,

Julius Gehr

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message