On Fri, Aug 7, 2009 at 6:30 PM, Platonides<Platonides(a)gmail.com> wrote:
<snip>
With many views, it will lock. page_counter is know to be slow.
You can make it to be updated just on average by setting
$wgHitcounterUpdateFreq to some largish value
http://www.mediawiki.org/wiki/Manual:$wgHitcounterUpdateFreq
Or simply disable them $wgDisableCounters
http://www.mediawiki.org/wiki/Manual:$wgDisableCounters
Interesting. Setting $wgDisableCounters = true; seems to have got
around the problem, but I'm confused about why this would be so. I'm
doing my testing on a testing instance of our wiki, an instance that
gets no traffic at all. So this particular issue isn't related to
load.
The query "UPDATE page SET page_counter = page_counter + 1 WHERE
page_id = <page id>" should execute really quickly, and sure enough it
does when I execute it manually ... less than 1/100 of second. The
problem doesn't seem to be with updating the counter, but something
locking the table or row and preventing that query from completing
until the lock times out, which turns out to be around 52 seconds
every time.
I could set $wgDisableCounters to true, but it seems like that is more
of a workaround than a solution in this case.
Is is possible that something in the MW code is setting a lock and not
releasing it explicitly, so the next query has to just wait for MySQL
to time it out?
Thanks,
Nathan