Page MenuHomePhabricator

Caching of Special:ActiveUsers is broken on small wikis
Closed, ResolvedPublic

Description

Since the change [1] which is supposed to "optimize" Special:ActiveUsers for massive wikis (bug report [2]), the page is completely unusable on small wikis.

The number of users in the list is much lower than it should be according to the Special:Statistics page. For example on ArchWiki [3], the list in Special:ActiveUsers shows about tens of users (or less), whereas according to Special:Statistics it should contain about 500 users. Other example of a small wiki with the same behaviour is e.g. [4], so it is likely not a configuration problem.

The users in the ActiveUsers list are not the most recently active users according to Special:RecentChanges.

The content of Special:ActiveUsers depends on how frequently the page is viewed, which is not very often on small wikis.

The second line on the ActiveUsers page says:

"You are viewing a cached version of this page, which can be up to 29 days, 23 hours and 40 minutes old."

On large wikis such as Wikipedia, this value is usually ~1d and the smaller the wiki is, the "older" the served page is. By common sense, this should be inverted as small wikis don't need as much caching.

The auactiveusers parameter of the API's allusers list [5] is also affected by caching, which means that queries using this parameter give incorrect results. The only way to get correct information is to read recentchanges list [6] and manually get the necessary information, which I'd imagine is more expensive query.

The final problem is missing configuration. If the caching of Special:ActiveUsers is not completely reverted, make it at least configurable so that small wikis can disable it to avoid side effects of the caching.

[1]: https://gerrit.wikimedia.org/r/#/c/110299/
[2]: https://phabricator.wikimedia.org/T43078
[3]: https://wiki.archlinux.org/index.php/Special:ActiveUsers
[4]: http://wiki.gentoo.org/wiki/Special:ActiveUsers
[5]: http://www.mediawiki.org/wiki/API:Allusers

Event Timeline

Lahwaacz raised the priority of this task from to Needs Triage.
Lahwaacz updated the task description. (Show Details)
Lahwaacz added a project: MediaWiki-Core-Team.
Lahwaacz added a subscriber: Lahwaacz.
bd808 changed the task status from Open to Stalled.Feb 9 2015, 8:23 PM
bd808 added a subscriber: bd808.

Hi @Lahwaacz,
unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please add a more useful and complete description to this report.

Lahwaacz changed the task status from Stalled to Open.Feb 9 2015, 8:49 PM
Lahwaacz updated the task description. (Show Details)
Lahwaacz added a project: Performance Issue.
Lahwaacz removed a subscriber: bd808.

@bd808 Unfortunately I have accidentally hit Enter while submitting the report, which has saved it prematurely...

(Phabricator's lack of edit conflict detection, which you just ran into, is tracked as T78236 :/ )

@bd808 Unfortunately I have accidentally hit Enter while submitting the report, which has saved it prematurely...

Thanks for updating it. :)

Aklapper triaged this task as Medium priority.Feb 9 2015, 11:36 PM
gerritbot added a subscriber: gerritbot.

Change 191094 had a related patch set uploaded (by Aaron Schulz):
Made ActiveUsers work a bit better on small wikis

https://gerrit.wikimedia.org/r/191094

Patch-For-Review

Change 191094 merged by jenkins-bot:
Made ActiveUsers work a bit better on small wikis

https://gerrit.wikimedia.org/r/191094

Nemo_bis added a subscriber: Nemo_bis.

If the change above works, it would be nice to backport it.

Change 202929 had a related patch set uploaded (by Aaron Schulz):
Moved ActiveUsers updates to recent changes jobs

https://gerrit.wikimedia.org/r/202929

Change 202929 merged by jenkins-bot:
Moved ActiveUsers updates to recent changes jobs

https://gerrit.wikimedia.org/r/202929

Concretely, this change fixes the issue only for the wikis which have a runJobs.php cron, right? The others will still rely on people loading random pages (which may get slower).

Concretely, this change fixes the issue only for the wikis which have a runJobs.php cron, right?

^ @aaron ?

Generally: What is the status here?
This task has numerous projects assigned (MW-1.23-release, MW-1.24-release, MW-1.25-release).
I see two patches by Aaron merged in git master, so I assume this is fixed for 1.25 at least?
Would backporting make sense?

Change 211999 had a related patch set uploaded (by Gilles):
Moved ActiveUsers updates to recent changes jobs

https://gerrit.wikimedia.org/r/211999

I won't venture into backporting < 1.25 for now, as RecentChangesUpdateJob was introduced in 1.25. The 1.25 backport looks straightforward.

demon added a subscriber: demon.

Removed 1.24 and 1.23 release. This was new code in 1.25 so it's a regression within the branch, not affecting prior releases. All applicable changes are in master and REL1_25. Resolving.

demon claimed this task.

Change 211999 merged by jenkins-bot:
Moved ActiveUsers updates to recent changes jobs

https://gerrit.wikimedia.org/r/211999

The problem seems to be still there. Running 1.25.1 (https://wiki.ellak.gr/Special:Version) and the Active Users page says:

You are viewing a cached version of this page, which can be up to 165 days, 3 hours, 14 minutes and 12 seconds old.

I ran updateSpecialPages.php, purged cache, rebuilt cache but nothing seems to fix it. Any clues? Is there a cron job I need to run?