Page MenuHomePhabricator

DBQueryError on Wikitech Static Search
Closed, ResolvedPublicPRODUCTION ERROR

Description

Special:Search on https://wikitech-static.wikimedia.org fails with a database error: [7cffe91bd97b733bea47d0e6] 2020-01-26 22:05:00: Fatal exception of type "Wikimedia\Rdbms\DBQueryError". The search bar on each page works as expected.

See also 105a282e52f525c02425aa97 on https://wikitech-static.wikimedia.org/w/index.php?search=Test&title=Special%3ASearch&profile=default&fulltext=1

Details

Request ID
7cffe91bd97b733bea47d0e6 / 105a282e52f525c02425aa97
Request URL
https://wikitech-static.wikimedia.org/w/index.php?search=Test&title=Special%3ASearch&profile=default&fulltext=1

Event Timeline

Restricted Application added a project: Discovery-Search. · View Herald TranscriptJan 26 2020, 10:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
RhinosF1 changed the subtype of this task from "Task" to "Production Error".Jan 26 2020, 10:19 PM
RhinosF1 set Request ID to 7cffe91bd97b733bea47d0e6.
RhinosF1 set Request URL to https://wikitech-static.wikimedia.org/wiki/Special:Search.
RhinosF1 renamed this task from Search broken on wikitech-static to DBQueryError on Wikitech Static Search.Jan 26 2020, 10:23 PM
RhinosF1 changed Request URL from https://wikitech-static.wikimedia.org/wiki/Special:Search to https://wikitech-static.wikimedia.org/w/index.php?search=Test&title=Special%3ASearch&profile=default&fulltext=1.
RhinosF1 changed Request ID from 7cffe91bd97b733bea47d0e6 to 7cffe91bd97b733bea47d0e6 / 105a282e52f525c02425aa97.
RhinosF1 updated the task description. (Show Details)
bd808 added a subscriber: bd808.

Removing Wikimedia-database-error as wikitech-static is not really a "production" wiki.

Andrew added a subscriber: Andrew.May 20 2020, 6:27 PM
[dbf6b55549aeaa4dd45553af] /w/index.php?search=ceph&title=Special%3ASearch&profile=default&fulltext=1 Wikimedia\Rdbms\DBQueryError from line 1603 of /srv/mediawiki/w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT page_id,page_namespace,page_title FROM `page`,`searchindex` WHERE (page_id=si_page) AND ( MATCH(si_title) AGAINST('+ceph ' IN BOOLEAN MODE) ) AND page_namespace = '0' ORDER BY MATCH(si_title) AGAINST('+ceph ' IN NATURAL LANGUAGE MODE) DESC LIMIT 21
Function: SearchMySQL::searchInternal
Error: 144 Table './wikitech/searchindex' is marked as crashed and last (automatic?) repair failed (localhost)

Backtrace:

#0 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1574): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#1 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1152): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /srv/mediawiki/w/includes/libs/rdbms/database/Database.php(1807): Wikimedia\Rdbms\Database->query(string, string)
#3 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#4 /srv/mediawiki/w/includes/libs/rdbms/database/DBConnRef.php(315): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#5 /srv/mediawiki/w/includes/search/SearchMySQL.php(193): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
#6 /srv/mediawiki/w/includes/search/SearchMySQL.php(179): SearchMySQL->searchInternal(string, boolean)
#7 /srv/mediawiki/w/includes/search/SearchDatabase.php(73): SearchMySQL->doSearchTitleInDB(string)
#8 /srv/mediawiki/w/includes/search/SearchEngine.php(143): SearchDatabase->doSearchTitle(string)
#9 /srv/mediawiki/w/includes/search/SearchEngine.php(172): SearchEngine->{closure}()
#10 /srv/mediawiki/w/includes/search/SearchEngine.php(144): SearchEngine->maybePaginate(Closure)
#11 /srv/mediawiki/w/includes/specials/SpecialSearch.php(355): SearchEngine->searchTitle(string)
#12 /srv/mediawiki/w/includes/specials/SpecialSearch.php(179): SpecialSearch->showResults(string)
#13 /srv/mediawiki/w/includes/specialpage/SpecialPage.php(575): SpecialSearch->execute(NULL)
#14 /srv/mediawiki/w/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)
#15 /srv/mediawiki/w/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#16 /srv/mediawiki/w/includes/MediaWiki.php(900): MediaWiki->performRequest()
#17 /srv/mediawiki/w/includes/MediaWiki.php(527): MediaWiki->main()
#18 /srv/mediawiki/w/index.php(44): MediaWiki->run()
#19 {main}

I left stack traces on, so you can reproduce and see this error without a wikitech-static login. Can we just rebuild that db?

bd808 added a comment.May 20 2020, 8:58 PM

Can we just rebuild that db?

Per the Error: 144 Table './wikitech/searchindex' is marked as crashed and last (automatic?) repair failed (localhost) line I would guess that trying to rebuild that table would be the first thing to try. I think that would look something like dropping the table, recreating it from the spec in maintentance/tables.sql, and then running https://www.mediawiki.org/wiki/Manual:Rebuildtextindex.php

Bstorm assigned this task to Andrew.Jun 2 2020, 4:23 PM
Bstorm triaged this task as Unbreak Now! priority.
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJun 2 2020, 4:23 PM
Andrew closed this task as Resolved.Jun 2 2020, 6:30 PM

@bd808's instructions seem to have worked.