Page MenuHomePhabricator

Multi-revision imports timing out on tokwiki
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
  • mwversion: 1.46.0-wmf.3
  • timestamp: 2025-11-27T06:56:14.275Z
  • phpversion: 8.3.26
  • reqId: ec99eb44-3fd2-4b04-ab9a-64ccaff9804b
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBQueryError: Error 1205: Lock wait timeout exceeded; try restarting transaction
Function: MediaWiki\Page\WikiPage::insertOn
Query: INSERT IGNORE INTO `page` (page_namespace,page_title,page_is_redirect,page_is_n
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/Database/Database.php(1226)
#0/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/Database/Database.php(1210)Wikimedia\Rdbms\Database->getQueryException(string, int, string, string)
#1/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/Database/Database.php(1184)Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, int, string, string)
#2/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/Database/Database.php(641)Wikimedia\Rdbms\Database->reportQueryError(string, int, string, string, bool)
#3/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/Database/Database.php(1506)Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#4/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/Database/DBConnRef.php(127)Wikimedia\Rdbms\Database->insert(string, array, string, array)
#5/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/Database/DBConnRef.php(455)Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6/srv/mediawiki/php-1.46.0-wmf.3/includes/libs/Rdbms/QueryBuilder/InsertQueryBuilder.php(340)Wikimedia\Rdbms\DBConnRef->insert(string, array, string, array)
#7/srv/mediawiki/php-1.46.0-wmf.3/includes/Page/WikiPage.php(1233)Wikimedia\Rdbms\InsertQueryBuilder->execute()
#8/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/ImportableOldRevisionImporter.php(78)MediaWiki\Page\WikiPage->insertOn(Wikimedia\Rdbms\DBConnRef)
#9/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/WikiRevision.php(626)ImportableOldRevisionImporter->import(WikiRevision)
#10/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/WikiImporter.php(476)WikiRevision->importOldRevision()
#11/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/WikiImporter.php(598)WikiImporter->importRevision(WikiRevision, WikiImporter)
#12/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/WikiImporter.php(1096)WikiImporter->revisionCallback(WikiRevision)
#13/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/WikiImporter.php(963)WikiImporter->processRevision(array, array)
#14/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/WikiImporter.php(895)WikiImporter->handleRevision(array)
#15/srv/mediawiki/php-1.46.0-wmf.3/includes/Import/WikiImporter.php(713)WikiImporter->handlePage()
#16/srv/mediawiki/php-1.46.0-wmf.3/includes/Specials/SpecialImport.php(232)WikiImporter->doImport()
#17/srv/mediawiki/php-1.46.0-wmf.3/includes/Specials/SpecialImport.php(99)MediaWiki\Specials\SpecialImport->doImport()
#18/srv/mediawiki/php-1.46.0-wmf.3/includes/SpecialPage/SpecialPage.php(711)MediaWiki\Specials\SpecialImport->execute(null)
#19/srv/mediawiki/php-1.46.0-wmf.3/includes/SpecialPage/SpecialPageFactory.php(1743)MediaWiki\SpecialPage\SpecialPage->run(null)
#20/srv/mediawiki/php-1.46.0-wmf.3/includes/Actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#21/srv/mediawiki/php-1.46.0-wmf.3/includes/Actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#22/srv/mediawiki/php-1.46.0-wmf.3/includes/MediaWikiEntryPoint.php(184)MediaWiki\Actions\ActionEntryPoint->execute()
#23/srv/mediawiki/php-1.46.0-wmf.3/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#24/srv/mediawiki/w/index.php(3)require(string)
#25{main}
Impact
Notes

Steps to replicate the issue (include links if applicable):

  • Access https://tok.wikipedia.org/wiki/Special:Import on an account with suitable permissions
  • Attempt import any of the following from enwiki: Module:Wikidata; Module:I18n; Template:Documentation seemingly any page?
  • Check all three checkboxes

What happens?:
A 503 error occurs. Representative examples:

Request served via cp5023 cp5023, Varnish XID 940773696
Error: 503, Backend fetch failed at Thu, 27 Nov 2025 05:33:05 GMT
Request served via cp5022 cp5022, Varnish XID 552955869
Error: 503, Backend fetch failed at Thu, 27 Nov 2025 08:47:08 GMT

According to @Soda, this is likely a 500 error on the backend from timing out. This seems likely, as if I switch to importing just the most recent revision, I still get an error about half the time, which is sometimes an explicit timeout error.

[ec99eb44-3fd2-4b04-ab9a-64ccaff9804b] 2025-11-27 06:56:14: pakala moli pi kulupu "Wikimedia\Rdbms\DBQueryError"
[3cdce11f-977a-413f-bea5-7736e21e4df1] 2025-11-27 07:14:23: pakala moli pi kulupu "Wikimedia\Rdbms\DBTransactionSizeError"

("pakala moli" = "fatal error")

Other information (browser name/version, screenshots, etc.):

I initially filed this as about "large imports", but then I hit the second 503 quoted above, on the very small import [[en:Module:Wd/doc]], so this seems to just be about any multi-rev import.

Note that tokwiki was only created recently (T404457), which may have something to do with this.

Details

MediaWiki Version
1.46.0-wmf.3
Request URL
https://tok.wikipedia.org/w/index.php?action=submit&title=*

Related Objects

Event Timeline

Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptNov 27 2025, 7:48 AM
Tamzin renamed this task from Large imports timing out on tokwiki to Multi-revision imports timing out on tokwiki.Nov 27 2025, 8:49 AM
Tamzin updated the task description. (Show Details)
taavi set Request URL to https://tok.wikipedia.org/w/index.php?action=submit&title=*.Nov 27 2025, 10:07 AM
taavi updated the task description. (Show Details)
taavi set Release Version to 1.46.0-wmf.3.
This comment was removed by Tamzin.