https://bugzilla.wikimedia.org/show_bug.cgi?id=43516

--- Comment #16 from Tim Starling <[email protected]> ---
In the old code, all threads finding the cache empty will wait for the lock,
taking turns to run loadFromDB(). They don't recheck the shared cache after the
lock is acquired. So if it loadFromDB() takes 1s, and there are 100 req/s, then
there will be 99 threads queued up waiting for the lock when the first one
finishes. Then each will run loadFromDB() in turn, for another 9 seconds. Then
the lock wait timeout will be reached, so the other 90 threads will fail to add
the status key and will hit the "Could not acquire $statusKey" exception
simultaneously. 

This theory agrees pretty well with the pattern of exception floods we see in
the logs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to