Database error and/or MediaWiki exception occurs upon trying to edit on Brickipedia
Open, Needs TriagePublic

Description

No screenshots, but there's been an error message that's been given that @NovaHawk received which I'll show below. It basically means that we need more space on our server, although I believe there's nothing much that can be done for that currently. This error has been confirmed by @lcf119 and @NovaHawk. We should still at least keep this in mind, and see if we can do something about this in the future, thus I've reported the bug here.

Exception encountered, of type "RuntimeException"
[3b8796f9] /index.php?title=79106_Cavalry_Builder_Set&action=submit RuntimeException from line 181 of /var/www/core/extensions/SemanticMediaWiki/src/MediaWiki/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT DISTINCT t5.smw_id AS id,t5.smw_title AS t,t5.smw_namespace AS ns,t5.smw_iw AS iw,t5.smw_subobject AS so,t5.smw_sortkey AS sortkey FROM `smw_object_ids` AS t5 INNER JOIN `smw_di_number` AS t1 ON t5.smw_id=t1.s_id INNER JOIN `smw_di_number` AS t3 ON t1.s_id=t3.s_id WHERE ((t1.o_sortkey<='79106') AND t1.p_id='181' AND ((t3.o_sortkey!='79106') AND t3.p_id='181')) ORDER BY t1.o_sortkey DESC LIMIT 6 
Function: SMW\SQLStore\QueryEngine\QueryEngine::getInstanceQueryResult
Error: 5 Out of memory (Needed 2096432 bytes) (localhost)

#0 /var/www/core/includes/db/Database.php(1076): DatabaseBase->reportQueryError('Out of memory (...', 5, 'SELECT DISTINC...', 'SMW\\SQLStore\\Qu...', false)
#1 /var/www/core/includes/db/Database.php(1600): DatabaseBase->query('SELECT DISTINC...', 'SMW\\SQLStore\\Qu...')
#2 /var/www/core/extensions/SemanticMediaWiki/src/MediaWiki/Database.php(179): DatabaseBase->select('`smw_object_ids...', 'DISTINCT t5.smw...', '((t1.o_sortkey<...', 'SMW\\SQLStore\\Qu...', Array, Array)
#3 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(420): SMW\MediaWiki\Database->select('`smw_object_ids...', 'DISTINCT t5.smw...', '((t1.o_sortkey<...', 'SMW\\SQLStore\\Qu...', Array)
#4 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(226): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult(Object(SMWQuery), 5)
#5 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(380): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult(Object(SMWQuery))
#6 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(371): SMWSQLStore3->fetchQueryResult(Object(SMWQuery))
#7 /var/www/core/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(510): SMWSQLStore3->getQueryResult(Object(SMWQuery))
#8 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(163): SMWQueryProcessor::getResultFromQuery(Object(SMWQuery), Array, 2, 1)
#9 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(120): SMW\AskParserFunction->doFetchResultsForRawParameters(Array)
#10 /var/www/core/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(248): SMW\AskParserFunction->parse(Array)
#11 [internal function]: SMW\ParserFunctionFactory->SMW\{closure}(Object(Parser), '[[Item_\xE2\x84\x96::<79...', '?Item_\xE2\x84\x96', '?Title', 'sort=Item_\xE2\x84\x96', 'order=descendin...', 'limit=1', 'format=template', 'template=Set he...', 'searchlabel=')
#12 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(Object(Closure), Array)
#13 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#ask', Array)
#14 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#15 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(106): PPFrame_DOM->expand(Object(PPNode_DOM))
#16 [internal function]: ExtParserFunctions::ifObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#17 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#18 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#if', Array)
#19 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#20 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(Object(PPNode_DOM))
#21 [internal function]: ExtParserFunctions::ifeqObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#22 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#23 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#ifeq', Array)
#24 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#25 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(Object(PPNode_DOM))
#26 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#27 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(157): PPFrame_DOM->expand(Object(PPNode_DOM))
#28 [internal function]: ExtParserFunctions::iferrorObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#29 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#30 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#iferror', Array)
#31 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#32 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(Object(PPNode_DOM))
#33 [internal function]: ExtParserFunctions::ifeqObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#34 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#35 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#ifeq', Array)
#36 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#37 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(Object(PPNode_DOM))
#38 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#39 /var/www/core/includes/parser/Parser.php(3342): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#40 /var/www/core/includes/parser/Parser.php(1239): Parser->replaceVariables('{{Rating}}\n{{Se...')
#41 /var/www/core/includes/parser/Parser.php(439): Parser->internalParse('{{Rating}}\n{{Se...')
#42 /var/www/core/includes/content/WikitextContent.php(331): Parser->parse('{{Rating}}\n{{Se...', Object(Title), Object(ParserOptions), true, true, NULL)
#43 /var/www/core/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Object(Title), NULL, Object(ParserOptions), true, Object(ParserOutput))
#44 /var/www/core/includes/page/WikiPage.php(2117): AbstractContent->getParserOutput(Object(Title), NULL, Object(ParserOptions))
#45 /var/www/core/extensions/SpamBlacklist/SpamBlacklistHooks.php(54): WikiPage->prepareContentForEdit(Object(WikitextContent))
#46 [internal function]: SpamBlacklistHooks::filterMergedContent(Object(RequestContext), Object(WikitextContent), Object(Status), '', Object(User), true)
#47 /var/www/core/includes/Hooks.php(201): call_user_func_array('SpamBlacklistHo...', Array)
#48 /var/www/core/includes/EditPage.php(1477): Hooks::run('EditFilterMerge...', Array)
#49 /var/www/core/includes/EditPage.php(1864): EditPage->runPostMergeFilters(Object(WikitextContent), Object(Status), Object(User))
#50 /var/www/core/includes/EditPage.php(1331): EditPage->internalAttemptSave(NULL, false)
#51 /var/www/core/includes/EditPage.php(560): EditPage->attemptSave(NULL)
#52 /var/www/core/includes/actions/EditAction.php(58): EditPage->edit()
#53 /var/www/core/includes/actions/SubmitAction.php(40): EditAction->show()
#54 /var/www/core/includes/MediaWiki.php(490): SubmitAction->show()
#55 /var/www/core/includes/MediaWiki.php(287): MediaWiki->performAction(Object(Article), Object(Title))
#56 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#57 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#58 /var/www/core/index.php(41): MediaWiki->run()
#59 {main}
Backtrace:
#0 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(420): SMW\MediaWiki\Database->select(string, string, string, string, array)
#1 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(226): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult(SMWQuery, integer)
#2 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(380): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult(SMWQuery)
#3 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(371): SMWSQLStore3->fetchQueryResult(SMWQuery)
#4 /var/www/core/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(510): SMWSQLStore3->getQueryResult(SMWQuery)
#5 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(163): SMWQueryProcessor::getResultFromQuery(SMWQuery, array, integer, integer)
#6 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(120): SMW\AskParserFunction->doFetchResultsForRawParameters(array)
#7 /var/www/core/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(248): SMW\AskParserFunction->parse(array)
#8 [internal function]: SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string, string, string, string, string, string, string, string)
#9 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(Closure, array)
#10 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#11 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#12 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(106): PPFrame_DOM->expand(PPNode_DOM)
#13 [internal function]: ExtParserFunctions::ifObj(Parser, PPTemplateFrame_DOM, array)
#14 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#15 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#16 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#17 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(PPNode_DOM)
#18 [internal function]: ExtParserFunctions::ifeqObj(Parser, PPTemplateFrame_DOM, array)
#19 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#20 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#21 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#22 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(PPNode_DOM)
#23 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#24 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(157): PPFrame_DOM->expand(PPNode_DOM)
#25 [internal function]: ExtParserFunctions::iferrorObj(Parser, PPTemplateFrame_DOM, array)
#26 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#27 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#28 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#29 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(PPNode_DOM)
#30 [internal function]: ExtParserFunctions::ifeqObj(Parser, PPTemplateFrame_DOM, array)
#31 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#32 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#33 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#34 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(PPNode_DOM)
#35 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPFrame_DOM)
#36 /var/www/core/includes/parser/Parser.php(3342): PPFrame_DOM->expand(PPNode_DOM, integer)
#37 /var/www/core/includes/parser/Parser.php(1239): Parser->replaceVariables(string)
#38 /var/www/core/includes/parser/Parser.php(439): Parser->internalParse(string)
#39 /var/www/core/includes/content/WikitextContent.php(331): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#40 /var/www/core/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#41 /var/www/core/includes/page/WikiPage.php(2117): AbstractContent->getParserOutput(Title, NULL, ParserOptions)
#42 /var/www/core/extensions/SpamBlacklist/SpamBlacklistHooks.php(54): WikiPage->prepareContentForEdit(WikitextContent)
#43 [internal function]: SpamBlacklistHooks::filterMergedContent(RequestContext, WikitextContent, Status, string, User, boolean)
#44 /var/www/core/includes/Hooks.php(201): call_user_func_array(string, array)
#45 /var/www/core/includes/EditPage.php(1477): Hooks::run(string, array)
#46 /var/www/core/includes/EditPage.php(1864): EditPage->runPostMergeFilters(WikitextContent, Status, User)
#47 /var/www/core/includes/EditPage.php(1331): EditPage->internalAttemptSave(NULL, boolean)
#48 /var/www/core/includes/EditPage.php(560): EditPage->attemptSave(NULL)
#49 /var/www/core/includes/actions/EditAction.php(58): EditPage->edit()
#50 /var/www/core/includes/actions/SubmitAction.php(40): EditAction->show()
#51 /var/www/core/includes/MediaWiki.php(490): SubmitAction->show()
#52 /var/www/core/includes/MediaWiki.php(287): MediaWiki->performAction(Article, Title)
#53 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#54 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#55 /var/www/core/index.php(41): MediaWiki->run()
#56 {main}
SamanthaNguyen moved this task from Backlog to General on the Brickimedia board.
SamanthaNguyen changed the title from "Database error occurs upon trying to edit on Brickipedia" to "Database error and/or MediaWiki exception occurs upon trying to edit on Brickipedia".Dec 8 2016, 10:39 PM
lcf119 added a comment.EditedDec 9 2016, 3:38 AM

I'm not sure if this would be classified as the same error, but I received a similar "database error" on another page.

Having similar problems and long error messages when trying to view certain pages (for example http://en.brickimedia.org/wiki/41143_Berry%27s_Kitchen). Have tried several times to load this and a couple of others and refreshing doesn't seem to help. It also took a few times refreshing for a search to work (error message for this was more like Nigma's above).

lcf119 added a comment.EditedDec 11 2016, 2:29 AM

These database errors aren't limited to editing pages only. I've been experiencing a myriad of errors related to this. Like Nova said, the search bar will sometimes give a database error that prevents it from working (it must be refreshed several times until it actually does work), and previewing a page that is affected by the database error from the source editor may or may not give an error sometimes. Simply attempting to access some pages that haven't been edited will also give the error (but can be read in source mode as wikitext).

I'm tempted to raise the priority of this ticket since that's concerning, I've also been receiving errors too. Not sure necessarily about "Unbreak Now!", but I think marking it as "High" could be reasonable.

lcf119 added a comment.EditedDec 11 2016, 8:08 PM

I just received a different database error while using Special:Search, which included the backtrace log below. I was searching for the term "Butterfly sword", just in case that matters (probably not).

#0 /var/www/core/includes/db/Database.php(1076): DatabaseBase->reportQueryError('Out of memory (...', 5, 'SHOW GLOBAL VAR...', 'SearchMySQL::mi...', false)
#1 /var/www/core/includes/search/SearchMySQL.php(442): DatabaseBase->query('SHOW GLOBAL VAR...', 'SearchMySQL::mi...')
#2 /var/www/core/includes/search/SearchMySQL.php(397): SearchMySQL->minSearchLength()
#3 /var/www/core/includes/search/SearchMySQL.php(104): SearchMySQL->normalizeText('Butterfly')
#4 /var/www/core/includes/search/SearchMySQL.php(294): SearchMySQL->parseQuery('Butterfly sword', false)
#5 /var/www/core/includes/search/SearchMySQL.php(268): SearchMySQL->queryMain(Array, 'Butterfly sword', false)
#6 /var/www/core/includes/search/SearchMySQL.php(183): SearchMySQL->getQuery('Butterfly sword', false)
#7 /var/www/core/includes/search/SearchMySQL.php(173): SearchMySQL->searchInternal('Butterfly sword', false)
#8 /var/www/core/includes/specials/SpecialSearch.php(264): SearchMySQL->searchTitle('Butterfly sword')
#9 /var/www/core/includes/specials/SpecialSearch.php(209): SpecialSearch->showResults('Butterfly sword')
#10 /var/www/core/includes/specials/SpecialSearch.php(125): SpecialSearch->goResult('Butterfly sword')
#11 /var/www/core/includes/specialpage/SpecialPage.php(384): SpecialSearch->execute(NULL)
#12 /var/www/core/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
#13 /var/www/core/includes/MediaWiki.php(281): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#14 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#15 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#16 /var/www/core/index.php(41): MediaWiki->run()
#17 {main}

Article feedback also seems unusable to me, with "[05d76a40] Database query error" coming up every time I try to mark something (although Vasko seems to have had some luck with it). And I guess this is probably pretty obvious, but it's not localised to 'pedia- just tried searching on meta and gbc and got a database error both times.

I've been experiencing those errors with article feedback as well, but I didn't report them as I didn't see "database error" and as such didn't report it.

I believe we can all agree that we could consider (again) for looking at other options to improve our sever, aye? I believe @UltrasonicNXT (although he is inactive) and @lcawte have also expressed concerns about it.

SamanthaNguyen added a comment.EditedDec 24 2016, 5:29 AM

Edit: It resolved itself after refreshing.
Accessing http://en.brickimedia.org/index.php?title=76076_Captain_America:_Jet_Pursuit&curid=80031&diff=1075825&oldid=1074636 resulted in the following error:

Exception encountered, of type "RuntimeException"
[617ae338] /index.php?title=76076_Captain_America:_Jet_Pursuit&curid=80031&diff=1075825&oldid=1074636 RuntimeException from line 181 of /var/www/core/extensions/SemanticMediaWiki/src/MediaWiki/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT DISTINCT t5.smw_id AS id,t5.smw_title AS t,t5.smw_namespace AS ns,t5.smw_iw AS iw,t5.smw_subobject AS so,t5.smw_sortkey AS sortkey FROM `smw_object_ids` AS t5 INNER JOIN `smw_di_number` AS t1 ON t5.smw_id=t1.s_id INNER JOIN `smw_di_number` AS t3 ON t1.s_id=t3.s_id WHERE ((t1.o_sortkey<='76076') AND t1.p_id='181' AND ((t3.o_sortkey!='76076') AND t3.p_id='181')) ORDER BY t1.o_sortkey DESC LIMIT 6 
Function: SMW\SQLStore\QueryEngine\QueryEngine::getInstanceQueryResult
Error: 5 Out of memory (Needed 2095920 bytes) (localhost)

#0 /var/www/core/includes/db/Database.php(1076): DatabaseBase->reportQueryError('Out of memory (...', 5, 'SELECT DISTINC...', 'SMW\\SQLStore\\Qu...', false)
#1 /var/www/core/includes/db/Database.php(1600): DatabaseBase->query('SELECT DISTINC...', 'SMW\\SQLStore\\Qu...')
#2 /var/www/core/extensions/SemanticMediaWiki/src/MediaWiki/Database.php(179): DatabaseBase->select('`smw_object_ids...', 'DISTINCT t5.smw...', '((t1.o_sortkey<...', 'SMW\\SQLStore\\Qu...', Array, Array)
#3 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(420): SMW\MediaWiki\Database->select('`smw_object_ids...', 'DISTINCT t5.smw...', '((t1.o_sortkey<...', 'SMW\\SQLStore\\Qu...', Array)
#4 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(226): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult(Object(SMWQuery), 5)
#5 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(380): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult(Object(SMWQuery))
#6 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(371): SMWSQLStore3->fetchQueryResult(Object(SMWQuery))
#7 /var/www/core/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(510): SMWSQLStore3->getQueryResult(Object(SMWQuery))
#8 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(163): SMWQueryProcessor::getResultFromQuery(Object(SMWQuery), Array, 2, 1)
#9 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(120): SMW\AskParserFunction->doFetchResultsForRawParameters(Array)
#10 /var/www/core/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(248): SMW\AskParserFunction->parse(Array)
#11 [internal function]: SMW\ParserFunctionFactory->SMW\{closure}(Object(Parser), '[[Item_\xE2\x84\x96::<76...', '?Item_\xE2\x84\x96', '?Title', 'sort=Item_\xE2\x84\x96', 'order=descendin...', 'limit=1', 'format=template', 'template=Set he...', 'searchlabel=')
#12 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(Object(Closure), Array)
#13 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#ask', Array)
#14 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#15 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(106): PPFrame_DOM->expand(Object(PPNode_DOM))
#16 [internal function]: ExtParserFunctions::ifObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#17 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#18 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#if', Array)
#19 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#20 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(Object(PPNode_DOM))
#21 [internal function]: ExtParserFunctions::ifeqObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#22 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#23 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#ifeq', Array)
#24 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#25 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(Object(PPNode_DOM))
#26 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#27 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(157): PPFrame_DOM->expand(Object(PPNode_DOM))
#28 [internal function]: ExtParserFunctions::iferrorObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#29 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#30 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#iferror', Array)
#31 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#32 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(Object(PPNode_DOM))
#33 [internal function]: ExtParserFunctions::ifeqObj(Object(Parser), Object(PPTemplateFrame_DOM), Array)
#34 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array('ExtParserFuncti...', Array)
#35 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPTemplateFrame_DOM), '#ifeq', Array)
#36 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPTemplateFrame_DOM))
#37 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(Object(PPNode_DOM))
#38 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#39 /var/www/core/includes/parser/Parser.php(3342): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#40 /var/www/core/includes/parser/Parser.php(1239): Parser->replaceVariables('{{Rating}}\n{{Se...')
#41 /var/www/core/includes/parser/Parser.php(439): Parser->internalParse('{{Rating}}\n{{Se...')
#42 /var/www/core/includes/content/WikitextContent.php(331): Parser->parse('{{Rating}}\n{{Se...', Object(Title), Object(ParserOptions), true, true, 1075825)
#43 /var/www/core/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Object(Title), 1075825, Object(ParserOptions), true, Object(ParserOutput))
#44 /var/www/core/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Object(Title), 1075825, Object(ParserOptions))
#45 /var/www/core/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#46 /var/www/core/includes/page/WikiPage.php(1126): PoolCounterWork->execute()
#47 /var/www/core/includes/diff/DifferenceEngine.php(616): WikiPage->getParserOutput(Object(ParserOptions), 1075825)
#48 /var/www/core/includes/diff/DifferenceEngine.php(594): DifferenceEngine->getParserOutput(Object(WikiPage), Object(Revision))
#49 /var/www/core/includes/diff/DifferenceEngine.php(455): DifferenceEngine->renderNewRevision()
#50 /var/www/core/includes/page/Article.php(797): DifferenceEngine->showDiffPage(false)
#51 /var/www/core/includes/page/Article.php(508): Article->showDiffPage()
#52 /var/www/core/includes/actions/ViewAction.php(44): Article->view()
#53 /var/www/core/includes/MediaWiki.php(490): ViewAction->show()
#54 /var/www/core/includes/MediaWiki.php(287): MediaWiki->performAction(Object(Article), Object(Title))
#55 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#56 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#57 /var/www/core/index.php(41): MediaWiki->run()
#58 {main}
Backtrace:
#0 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(420): SMW\MediaWiki\Database->select(string, string, string, string, array)
#1 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(226): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult(SMWQuery, integer)
#2 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(380): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult(SMWQuery)
#3 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(371): SMWSQLStore3->fetchQueryResult(SMWQuery)
#4 /var/www/core/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(510): SMWSQLStore3->getQueryResult(SMWQuery)
#5 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(163): SMWQueryProcessor::getResultFromQuery(SMWQuery, array, integer, integer)
#6 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(120): SMW\AskParserFunction->doFetchResultsForRawParameters(array)
#7 /var/www/core/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(248): SMW\AskParserFunction->parse(array)
#8 [internal function]: SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string, string, string, string, string, string, string, string)
#9 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(Closure, array)
#10 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#11 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#12 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(106): PPFrame_DOM->expand(PPNode_DOM)
#13 [internal function]: ExtParserFunctions::ifObj(Parser, PPTemplateFrame_DOM, array)
#14 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#15 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#16 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#17 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(PPNode_DOM)
#18 [internal function]: ExtParserFunctions::ifeqObj(Parser, PPTemplateFrame_DOM, array)
#19 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#20 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#21 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#22 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(PPNode_DOM)
#23 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#24 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(157): PPFrame_DOM->expand(PPNode_DOM)
#25 [internal function]: ExtParserFunctions::iferrorObj(Parser, PPTemplateFrame_DOM, array)
#26 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#27 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#28 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#29 /var/www/core/extensions/ParserFunctions/ParserFunctions_body.php(122): PPFrame_DOM->expand(PPNode_DOM)
#30 [internal function]: ExtParserFunctions::ifeqObj(Parser, PPTemplateFrame_DOM, array)
#31 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(string, array)
#32 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPTemplateFrame_DOM, string, array)
#33 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPTemplateFrame_DOM)
#34 /var/www/core/includes/parser/Parser.php(3665): PPFrame_DOM->expand(PPNode_DOM)
#35 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPFrame_DOM)
#36 /var/www/core/includes/parser/Parser.php(3342): PPFrame_DOM->expand(PPNode_DOM, integer)
#37 /var/www/core/includes/parser/Parser.php(1239): Parser->replaceVariables(string)
#38 /var/www/core/includes/parser/Parser.php(439): Parser->internalParse(string)
#39 /var/www/core/includes/content/WikitextContent.php(331): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#40 /var/www/core/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#41 /var/www/core/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#42 /var/www/core/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#43 /var/www/core/includes/page/WikiPage.php(1126): PoolCounterWork->execute()
#44 /var/www/core/includes/diff/DifferenceEngine.php(616): WikiPage->getParserOutput(ParserOptions, integer)
#45 /var/www/core/includes/diff/DifferenceEngine.php(594): DifferenceEngine->getParserOutput(WikiPage, Revision)
#46 /var/www/core/includes/diff/DifferenceEngine.php(455): DifferenceEngine->renderNewRevision()
#47 /var/www/core/includes/page/Article.php(797): DifferenceEngine->showDiffPage(boolean)
#48 /var/www/core/includes/page/Article.php(508): Article->showDiffPage()
#49 /var/www/core/includes/actions/ViewAction.php(44): Article->view()
#50 /var/www/core/includes/MediaWiki.php(490): ViewAction->show()
#51 /var/www/core/includes/MediaWiki.php(287): MediaWiki->performAction(Article, Title)
#52 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#53 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#54 /var/www/core/index.php(41): MediaWiki->run()
#55 {main}

Occurred when trying to view http://en.brickimedia.org/wiki/10255_Assembly_Square. Took 3 refreshes to access the page. Not sure if I'd call this a database error as much as it is an SMW error.

SamanthaNguyen added a comment.EditedJan 21 2017, 2:56 PM

Just received a RunTimeException when trying to access the Main Page of Brickipedia a few minutes ago. See screenshot also: https://cloud.githubusercontent.com/assets/4723983/22175279/7a5e011a-dfb7-11e6-94ad-f18bc2486653.png

It went away after 2 refreshes.

Exception encountered, of type "RuntimeException"
[e7c2cf84] /wiki/Main_Page RuntimeException from line 181 of /var/www/core/extensions/SemanticMediaWiki/src/MediaWiki/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT DISTINCT t0.smw_id AS id,t0.smw_title AS t,t0.smw_namespace AS ns,t0.smw_iw AS iw,t0.smw_subobject AS so,t0.smw_sortkey AS sortkey FROM `smw_object_ids` AS t0 INNER JOIN `smw_di_time` AS t2 ON t0.smw_id=t2.s_id WHERE t0.smw_namespace='2000' AND (t2.p_id='449') ORDER BY t2.o_sortkey DESC LIMIT 15 
Function: SMW\SQLStore\QueryEngine\QueryEngine::getInstanceQueryResult
Error: 5 Out of memory (Needed 2095920 bytes) (localhost)

#0 /var/www/core/includes/db/Database.php(1076): DatabaseBase->reportQueryError('Out of memory (...', 5, 'SELECT DISTINC...', 'SMW\\SQLStore\\Qu...', false)
#1 /var/www/core/includes/db/Database.php(1600): DatabaseBase->query('SELECT DISTINC...', 'SMW\\SQLStore\\Qu...')
#2 /var/www/core/extensions/SemanticMediaWiki/src/MediaWiki/Database.php(179): DatabaseBase->select('`smw_object_ids...', 'DISTINCT t0.smw...', 't0.smw_namespac...', 'SMW\\SQLStore\\Qu...', Array, Array)
#3 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(420): SMW\MediaWiki\Database->select('`smw_object_ids...', 'DISTINCT t0.smw...', 't0.smw_namespac...', 'SMW\\SQLStore\\Qu...', Array)
#4 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(226): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult(Object(SMWQuery), 0)
#5 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(380): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult(Object(SMWQuery))
#6 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(371): SMWSQLStore3->fetchQueryResult(Object(SMWQuery))
#7 /var/www/core/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(510): SMWSQLStore3->getQueryResult(Object(SMWQuery))
#8 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(163): SMWQueryProcessor::getResultFromQuery(Object(SMWQuery), Array, 2, 1)
#9 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(120): SMW\AskParserFunction->doFetchResultsForRawParameters(Array)
#10 /var/www/core/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(248): SMW\AskParserFunction->parse(Array)
#11 [internal function]: SMW\ParserFunctionFactory->SMW\{closure}(Object(Parser), '[[Brickipedia N...', '?NewsTitle', '?NewsDate', '?NewsDate#SORTK...', 'format=template', 'template=MP-new...', 'limit=10', 'sort=NewsDate', 'order=desc', 'searchlabel=')
#12 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(Object(Closure), Array)
#13 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(Object(PPFrame_DOM), '#ask', Array)
#14 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#15 /var/www/core/includes/parser/Parser.php(3342): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#16 /var/www/core/includes/parser/Parser.php(1239): Parser->replaceVariables('__NOEDITSECTION...')
#17 /var/www/core/includes/parser/Parser.php(439): Parser->internalParse('__NOEDITSECTION...')
#18 /var/www/core/includes/content/WikitextContent.php(331): Parser->parse('__NOEDITSECTION...', Object(Title), Object(ParserOptions), true, true, 1067867)
#19 /var/www/core/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Object(Title), 1067867, Object(ParserOptions), true, Object(ParserOutput))
#20 /var/www/core/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Object(Title), 1067867, Object(ParserOptions))
#21 /var/www/core/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#22 /var/www/core/includes/page/Article.php(676): PoolCounterWork->execute()
#23 /var/www/core/includes/actions/ViewAction.php(44): Article->view()
#24 /var/www/core/includes/MediaWiki.php(490): ViewAction->show()
#25 /var/www/core/includes/MediaWiki.php(287): MediaWiki->performAction(Object(Article), Object(Title))
#26 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#27 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#28 /var/www/core/index.php(41): MediaWiki->run()
#29 {main}
Backtrace:
#0 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(420): SMW\MediaWiki\Database->select(string, string, string, string, array)
#1 /var/www/core/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(226): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult(SMWQuery, integer)
#2 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(380): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult(SMWQuery)
#3 /var/www/core/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(371): SMWSQLStore3->fetchQueryResult(SMWQuery)
#4 /var/www/core/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(510): SMWSQLStore3->getQueryResult(SMWQuery)
#5 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(163): SMWQueryProcessor::getResultFromQuery(SMWQuery, array, integer, integer)
#6 /var/www/core/extensions/SemanticMediaWiki/includes/parserhooks/AskParserFunction.php(120): SMW\AskParserFunction->doFetchResultsForRawParameters(array)
#7 /var/www/core/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(248): SMW\AskParserFunction->parse(array)
#8 [internal function]: SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string, string, string, string, string, string, string, string, string)
#9 /var/www/core/includes/parser/Parser.php(3789): call_user_func_array(Closure, array)
#10 /var/www/core/includes/parser/Parser.php(3523): Parser->callParserFunction(PPFrame_DOM, string, array)
#11 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPFrame_DOM)
#12 /var/www/core/includes/parser/Parser.php(3342): PPFrame_DOM->expand(PPNode_DOM, integer)
#13 /var/www/core/includes/parser/Parser.php(1239): Parser->replaceVariables(string)
#14 /var/www/core/includes/parser/Parser.php(439): Parser->internalParse(string)
#15 /var/www/core/includes/content/WikitextContent.php(331): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#16 /var/www/core/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#17 /var/www/core/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#18 /var/www/core/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#19 /var/www/core/includes/page/Article.php(676): PoolCounterWork->execute()
#20 /var/www/core/includes/actions/ViewAction.php(44): Article->view()
#21 /var/www/core/includes/MediaWiki.php(490): ViewAction->show()
#22 /var/www/core/includes/MediaWiki.php(287): MediaWiki->performAction(Article, Title)
#23 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#24 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#25 /var/www/core/index.php(41): MediaWiki->run()
#26 {main}