Topic on Project:Support desk

Category links not updating automatically, not solved by job queue

9
Summary by PlavorSeol

Duplicated

WikipedianJota (talkcontribs)

I installed MediaWiki from the docker official container (https://hub.docker.com/_/mediawiki/) in a Google Cloud VM running Debian. All appears to be working fine, except that the category links are not updating (i.e., when I add or change categories or some pages' categories, these changes are not recognized by the indexes of pages within categories). If I run refreshLinks.php, all is updated fine.

I read in other posts that a possible reason could be the job queue (StackOverflow Q, on mw.o here, Special:Whatlinkshere and file usage aren't being updated). So I changed $wgJobRunRate to 10, set $wgRunJobsAsync to false, and ran runJobs.php, but it did not change the behaviour. If I make changes to the pages' categories, the showJobs.php will say that I have 0 jobs in queue, but the categories would be wrong. I run refreshLinks.php, and the categories are fixed.

Used versions are: Mediawiki 1.31.0; PHP 7.2.8; SQLite 3.20.1; ICU 57.1.

I appreciate your help to get the usual behavior of links are automatically updating, so I don't have to keep running refreshLinks.php.

MarkAHershberger (talkcontribs)

$wgJobRunRate is meant to be set to a number between 0 and 1, inclusive. Try setting it to 1.

WikipedianJota (talkcontribs)

Set $wgJobRunRate to 1. Still not updating. I tried in a new VM and the issue reproduces.

Ciencia Al Poder (talkcontribs)

A faulty extension might be breaking when you save the page, saving the page but not inserting the necessary jobs to update the links. Set up logs and php error reporting and try saving the page again, and see if there's some error popping up. (check Manual:How to debug)

WikipedianJota (talkcontribs)

Did a fresh install (from docker image, using SQLite) without extensions. Issue still present. Also tested on a localhost, and the issue is present. I asked this in StackOverflow and someone said that they also have this issue (https://stackoverflow.com/questions/51876717/mediawiki-links-not-updating-automatically-not-solved-by-job-queue).

Used logs (which I do not understand), but the mentions of error were:

  • #19 {main}

[runJobs] recentChangesUpdate Special:RecentChanges type=purge requestId=3ee8daeac7c45827ca48b1a5 (id=5,timestamp=20180818012150) STARTING [exception] [3ee8daeac7c45827ca48b1a5] /index.php/TestPage1 Wikimedia\Rdbms\DBUnexpectedError from line 3879 of /var/www/html/includes/libs/rdbms/database/Database.php: RecentChangesUpdateJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).

  • #19 {main}

[DBQuery] my_wiki ROLLBACK /* MWExceptionHandler::rollbackMasterChangesAndLog IP */ [exception] [3ee8daeac7c45827ca48b1a5] /index.php/TestPage1 Wikimedia\Rdbms\DBExpectedError from line 1340 of /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php: RecentChangesUpdateJob::run: Flush failed on server(s) : RecentChangesUpdateJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).

  • #19 {main}

[DBQuery] my_wiki SELECT /* JobQueueDB::recycleAndDeleteStaleJobs IP */ job_id FROM job WHERE job_cmd = 'userGroupExpiry' AND (job_token != ) AND (job_token_timestamp < '20180818003653') AND (job_attempts < '3') [DBQuery] my_wiki SELECT /* JobQueueDB::recycleAndDeleteStaleJobs IP */ job_id FROM job WHERE job_cmd = 'userGroupExpiry' AND (job_token != ) AND (job_token_timestamp < '20180811013653') AND (job_attempts >= '3') [runJobs] userGroupExpiry Main_Page requestId=aa41c39d4727eb5422905189 (id=1,timestamp=20180818011857) STARTING [exception] [aa41c39d4727eb5422905189] /index.php/Category:TestCat2 Wikimedia\Rdbms\DBUnexpectedError from line 3879 of /var/www/html/includes/libs/rdbms/database/Database.php: UserGroupExpiryJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).

Should I report as bug?

WikipedianJota (talkcontribs)

Another update. I did another install using the same mediawiki docker image, but now with a MariaDB container as database, and the categories and links are properly updating. So I think this is an issue when using SQLite.

星耀晨曦 (talkcontribs)

MariaDB/MySQL is our recommended relational database softwares.

Lianxiangru (talkcontribs)

"SQLite support for MediaWiki is of production quality as of MediaWiki 1.17." according to Manual:SQLite ..

Tgr (talkcontribs)

Those error lines are missing most of the stack traces.