Page MenuHomePhabricator

WMFTimeoutException (due to template inclusion) when accessing old versions of a page: "the execution time limit of 60 seconds was exceeded"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Steps to Reproduce:
Try to access one of the following URLs in any browser:

Actual Results:
More often than not one gets errors such as:

  • [XdbIBwpAIC0AAF55LiEAAABS] 2019-11-21 17:24:20: Fataler Ausnahmefehler des Typs „WMFTimeoutException“
  • [XdbICQpAAEUAAAlZsqwAAADF] 2019-11-21 17:24:21: Fataler Ausnahmefehler des Typs „WMFTimeoutException“
  • [XdbIdApAICgAAE-DNjYAAACC] 2019-11-21 17:26:08: Fataler Ausnahmefehler des Typs „WMFTimeoutException“
  • [XdbIdwpAAEIAAHC5biUAAAHB] 2019-11-21 17:26:11: Fataler Ausnahmefehler des Typs „WMFTimeoutException“

Expected Results:
Old page content is displayed.

Details

Request ID
XdbIBwpAIC0AAF55LiEAAABS
Request URL
https://de.wikipedia.org/w/index.php?title=V%C3%B6lkermarkt&oldid=189181004
Stack Trace

#0 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3544): {closure}(integer)
#1 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3270): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#2 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#3 /srv/mediawiki/php-1.35.0-wmf.5/extensions/ParserFunctions/includes/ParserFunctions.php(123): PPFrame_Hash->expand(PPNode_Hash_Tree)
#4 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3566): MediaWiki\Extensions\ParserFunctions\ParserFunctions::if(Parser, PPTemplateFrame_Hash, array)
#5 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3270): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#6 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#7 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3448): PPFrame_Hash->expand(PPNode_Hash_Tree)
#8 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#9 /srv/mediawiki/php-1.35.0-wmf.5/extensions/ParserFunctions/includes/ParserFunctions.php(123): PPFrame_Hash->expand(PPNode_Hash_Tree)
#10 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3566): MediaWiki\Extensions\ParserFunctions\ParserFunctions::if(Parser, PPTemplateFrame_Hash, array)
#11 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3270): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#12 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#13 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPTemplateFrame_Hash.php(152): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#14 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPTemplateFrame_Hash.php(179): PPTemplateFrame_Hash->getNumberedArgument(string)
#15 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3955): PPTemplateFrame_Hash->getArgument(string)
#16 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(270): Parser->argSubstitution(array, PPTemplateFrame_Hash)
#17 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPTemplateFrame_Hash.php(152): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#18 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPTemplateFrame_Hash.php(179): PPTemplateFrame_Hash->getNumberedArgument(string)
#19 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(672): PPTemplateFrame_Hash->getArgument(string)
#20 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(391): Scribunto_LuaEngine->getExpandedArgument(string, string)
#21 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
#22 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(314): LuaSandboxFunction->call(LuaSandboxFunction)
#23 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(292): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#24 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(979): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
#25 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
#26 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3566): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
#27 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3270): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#28 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#29 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3448): PPFrame_Hash->expand(PPNode_Hash_Tree)
#30 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#31 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3448): PPFrame_Hash->expand(PPNode_Hash_Tree)
#32 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPFrame_Hash)
#33 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPTemplateFrame_Hash.php(152): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#34 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPTemplateFrame_Hash.php(179): PPTemplateFrame_Hash->getNumberedArgument(string)
#35 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3955): PPTemplateFrame_Hash->getArgument(string)
#36 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(270): Parser->argSubstitution(array, PPTemplateFrame_Hash)
#37 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3448): PPFrame_Hash->expand(PPNode_Hash_Tree)
#38 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPFrame_Hash)
#39 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(3112): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#40 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(1477): Parser->replaceVariables(string)
#41 /srv/mediawiki/php-1.35.0-wmf.5/includes/parser/Parser.php(585): Parser->internalParse(string)
#42 /srv/mediawiki/php-1.35.0-wmf.5/includes/content/WikitextContent.php(368): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#43 /srv/mediawiki/php-1.35.0-wmf.5/includes/content/AbstractContent.php(555): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#44 /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RenderedRevision.php(267): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#45 /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RenderedRevision.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#46 /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)
#47 /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#48 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#49 /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RenderedRevision.php(198): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#50 /srv/mediawiki/php-1.35.0-wmf.5/includes/poolcounter/PoolWorkArticleView.php(196): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#51 /srv/mediawiki/php-1.35.0-wmf.5/includes/poolcounter/PoolCounterWork.php(125): PoolWorkArticleView->doWork()
#52 /srv/mediawiki/php-1.35.0-wmf.5/includes/page/Article.php(791): PoolCounterWork->execute()
#53 /srv/mediawiki/php-1.35.0-wmf.5/includes/actions/ViewAction.php(63): Article->view()
#54 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(514): ViewAction->show()
#55 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(304): MediaWiki->performAction(Article, Title)
#56 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(967): MediaWiki->performRequest()
#57 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(530): MediaWiki->main()
#58 /srv/mediawiki/php-1.35.0-wmf.5/index.php(46): MediaWiki->run()
#59 /srv/mediawiki/w/index.php(3): require(string)
#60 {main}

Event Timeline

Ammarpad changed the subtype of this task from "Bug Report" to "Production Error".Nov 22 2019, 12:11 AM

The article includes template https://de.wikipedia.org/wiki/Vorlage:Metadaten_Einwohnerzahl_AT_Ortschaft multiple (81) times. I wonder, if some kind of cache can be implemented, so parsing of a template is done only once.

From my experience with Wikipedia, I often see the templates are included multiple times in some article, so this would reduce times for rendering the pages not only in this particular case.

The 17,000 element #switch in https://de.wikipedia.org/wiki/Vorlage:Metadaten_Einwohnerzahl_AT_Ortschaft was the culprit. I transformed it into a nested switch and now it works perfectly. Would it somehow be possible to include profiling data to see where the time is spent in the HTML output? That would make it much easier to track down issues like this.

Aklapper renamed this task from Spurious WMFTimeoutException when accessing old versions of a page on dewiki to WMFTimeoutException (due to template inclusion) when accessing old versions of a page: "the execution time limit of 60 seconds was exceeded".Nov 22 2019, 1:04 PM
Aklapper set Request URL to https://de.wikipedia.org/w/index.php?title=V%C3%B6lkermarkt&oldid=189181004.
Aklapper set Request ID to XdbIBwpAIC0AAF55LiEAAABS.
Aklapper edited Stack Trace. (Show Details)

Would it somehow be possible to include profiling data to see where the time is spent in the HTML output? That would make it much easier to track down issues like this.

@Count_Count: The HTML source includes a "Transclusion expansion time report". Could you elaborate what exactly you are missing / want to see?

Would it somehow be possible to include profiling data to see where the time is spent in the HTML output? That would make it much easier to track down issues like this.

@Count_Count: The HTML source includes a "Transclusion expansion time report". Could you elaborate what exactly you are missing / want to see?

@Aklapper: If the page is correctly rendered, it includes the report and that is very helpful. However if the the execution time limit is exceeded the error page does not seem to include the report when I checked.

@Count_Count: Ah, thanks. Makes sense. Could you create a separate task (maybe under MediaWiki-Parser) for this enhancement request, please?

@Count_Count: Ah, thanks. Makes sense. Could you create a separate task (maybe under MediaWiki-Parser) for this enhancement request, please?

Done: T238976

Closing this task as resolved.