Page MenuHomePhabricator

Setting any $wgHitcounterUpdateFreq greater than 1 halts pagecounters
Closed, ResolvedPublic

Description

Author: carlb613

Description:
Presumably, hitcounter is an SQL memory table which temporarily pagenumbers as
pages are viewed; this is supposed to be periodically written back to the main
database. The number of entries amassed before doing so is $wgHitcounterUpdateFreq.

With the MW 1.9-svn software (Dec 29 version, installed with memcached and
eAccelerator), I'm seeing entries do indeed find their way into the hitcounter
table (in memory) but then never get written back to the main page table. They
accumulate until $wgHitcounterUpdateFreq records are created in memory, then
they disappear entirely.

End result is that, for example, if "this page has been viewed 230234 times":
come back a few days later and it's still at 230234.

Configuring the wiki to write the page counter to the main database on every
pageview does make the problem goes away - but with a penalty in speed.


Version: 1.9.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz8447

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:30 PM
bzimport set Reference to bz8447.
bzimport added a subscriber: Unknown Object (MLST).

Heh...

SQL: CREATE TEMPORARY TABLE acchits ENGINE=HEAP ASSELECT hc_id,COUNT(*) AS
hc_n FROM hitcounter GROUP BY hc_id
SQL ERROR (ignored): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'ASSELECT hc_id,COUNT(*) AS hc_n FROM hitcounter GROUP BY hc_id' at line 1
(localhost)

Fixed in r18704.