Page MenuHomePhabricator

{{NUMBEROFACTIVEUSERS}} doesn't get updated on non-miser mode wikis
Closed, DuplicatePublic

Description

It seems like {{NUMBEROFACTIVEUSERS}} (and active users on Special:Statistics) is primarily updated via updateSpecialPages.php (i.e. $wgSpecialPageCacheUpdates callback) [To be clear, this does not include Special:ActiveUsers which goes through a different process]

Wikis with $wgMiserMode = false; generally don't run that script, hence the variable gets out of date.

We should run the cache update from the job queue from time to time for those wikis (Maybe as part of the recent changes purging job)

There was a complaint on mailing list about this https://lists.wikimedia.org/pipermail/mediawiki-l/2017-October/046906.html

Event Timeline

Bawolff created this task.Oct 25 2017, 3:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 25 2017, 3:18 PM
Seb35 added a subscriber: Seb35.Jan 13 2018, 5:18 PM
Seb35 added a comment.Jan 13 2018, 5:54 PM

By following how is updated the statistics of active users, except if I’m mistaken:

  1. it is stored in the table site_stats in the column ss_active_users
  2. this column is only update in SiteStatsUpdate::cacheUpdate
  3. this static function is only called from
    • the maintenance scripts InitSiteStats and UpdateSpecialPages (the second through the parameter wgSpecialPageCacheUpdates which has a default value to add this function as a callback)
    • the function SiteStats::doAllAndCommit, but the flag to execute SiteStatsUpdate::cacheUpdate is false by default and is never set to true elsewhere

Hence, except when one of these two scripts is ran (which is not clearly documented), the statistics of active users is not updated.