MediaWiki internal error.

Original exception: [46e1c481] [no req] DBQueryError from line 1119 of /var/www/core/includes/db/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 COUNT(*) AS count FROM `shared`.`user`,`revision`,`page` WHERE user_id = '4' AND page_namespace = '' AND (rev_user = user_id) AND (rev_page = page_id) GROUP BY page_namespace LIMIT 1
Function: Editcount::editsInNs
Error: 5 Out of memory (Needed 2095120 bytes) (localhost)

Backtrace:
#0 /var/www/core/includes/db/Database.php(1076): DatabaseBase->reportQueryError(string, integer, string, string, boolean)
#1 /var/www/core/includes/db/Database.php(1600): DatabaseBase->query(string, string)
#2 /var/www/core/includes/db/Database.php(1267): DatabaseBase->select(array, array, array, string, array)
#3 /var/www/core/extensions/Editcount/Editcount_body.php(139): DatabaseBase->selectField(array, array, array, string, array)
#4 /var/www/core/extensions/Editcount/Editcount_body.php(36): Editcount->editsInNs(integer, boolean)
#5 /var/www/core/includes/specialpage/SpecialPage.php(384): Editcount->execute(string)
#6 /var/www/core/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(string)
#7 /var/www/core/includes/specialpage/SpecialPageFactory.php(590): SpecialPageFactory::executePath(Title, RequestContext, boolean)
#8 /var/www/core/includes/parser/Parser.php(3593): SpecialPageFactory::capturePath(Title, RequestContext)
#9 /var/www/core/includes/parser/Preprocessor_DOM.php(1177): Parser->braceSubstitution(array, PPFrame_DOM)
#10 /var/www/core/includes/parser/Parser.php(3342): PPFrame_DOM->expand(PPNode_DOM, integer)
#11 /var/www/core/includes/parser/Parser.php(1239): Parser->replaceVariables(string)
#12 /var/www/core/includes/parser/Parser.php(439): Parser->internalParse(string)
#13 /var/www/core/includes/content/WikitextContent.php(331): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#14 /var/www/core/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#15 /var/www/core/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#16 /var/www/core/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#17 /var/www/core/includes/page/Article.php(676): PoolCounterWork->execute()
#18 /var/www/core/extensions/SocialProfile/UserProfile/UserProfilePage.php(96): Article->view()
#19 /var/www/core/includes/actions/ViewAction.php(44): UserProfilePage->view()
#20 /var/www/core/includes/MediaWiki.php(490): ViewAction->show()
#21 /var/www/core/includes/MediaWiki.php(287): MediaWiki->performAction(UserProfilePage, Title)
#22 /var/www/core/includes/MediaWiki.php(714): MediaWiki->performRequest()
#23 /var/www/core/includes/MediaWiki.php(508): MediaWiki->main()
#24 /var/www/core/index.php(41): MediaWiki->run()
#25 {main}

Exception caught inside exception handler: [fb466b2a] [no req] MWException from line 1418 of /var/www/core/includes/WebRequest.php: Request URL not set
Backtrace:
#0 /var/www/core/includes/skins/SkinTemplate.php(1070): FauxRequest->getRequestURL()
#1 /var/www/core/includes/skins/SkinTemplate.php(456): SkinTemplate->buildContentNavigationUrls()
#2 /var/www/core/includes/skins/SkinTemplate.php(240): SkinTemplate->prepareQuickTemplate(OutputPage)
#3 /var/www/core/includes/OutputPage.php(2326): SkinTemplate->outputPage()
#4 /var/www/core/includes/exception/MWException.php(204): OutputPage->output()
#5 /var/www/core/includes/exception/MWException.php(244): MWException->reportHTML()
#6 /var/www/core/includes/exception/MWExceptionHandler.php(69): MWException->report()
#7 /var/www/core/includes/exception/MWExceptionHandler.php(180): MWExceptionHandler::report(DBQueryError)
#8 /var/www/core/includes/MediaWiki.php(517): MWExceptionHandler::handleException(DBQueryError)
#9 /var/www/core/index.php(41): MediaWiki->run()
#10 {main}