Page MenuHomePhabricator

SparqlClient: 504 Gateway Timeout
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.21

message
HTTP error: There was a problem during the HTTP request: 504 Gateway Timeout

Impact

Notes

Details

Request ID
X9owyApAML8AAWlXAfsAAABF
Request URL
https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=painting&mediasearch_experimental&dumpEntities
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.36.0-wmf.21/extensions/WikibaseMediaInfo/src/Search/MediaSearchExperimentalEntityTraversingEntitiesFetcher.php(94): MediaWiki\Sparql\SparqlClient->query(string)
#1 /srv/mediawiki/php-1.36.0-wmf.21/extensions/WikibaseMediaInfo/src/Search/MediaSearchMemoryEntitiesFetcher.php(34): Wikibase\MediaInfo\Search\MediaSearchExperimentalEntityTraversingEntitiesFetcher->get(array)
#2 /srv/mediawiki/php-1.36.0-wmf.21/extensions/WikibaseMediaInfo/src/Search/MediaQueryBuilder.php(518): Wikibase\MediaInfo\Search\MediaSearchMemoryEntitiesFetcher->get(array)
#3 /srv/mediawiki/php-1.36.0-wmf.21/extensions/WikibaseMediaInfo/src/Search/MediaQueryBuilder.php(236): Wikibase\MediaInfo\Search\MediaQueryBuilder->getStatementTerms(string)
#4 /srv/mediawiki/php-1.36.0-wmf.21/extensions/WikibaseMediaInfo/src/Search/MediaQueryBuilder.php(188): Wikibase\MediaInfo\Search\MediaQueryBuilder->createStatementsFilterQuery(string)
#5 /srv/mediawiki/php-1.36.0-wmf.21/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php(205): Wikibase\MediaInfo\Search\MediaQueryBuilder->buildSearchTextQuery(CirrusSearch\Search\SearchContext, array, array, string, string)
#6 /srv/mediawiki/php-1.36.0-wmf.21/extensions/CirrusSearch/includes/Searcher.php(308): CirrusSearch\Query\FullTextQueryStringQueryBuilder->build(CirrusSearch\Search\SearchContext, string)
#7 /srv/mediawiki/php-1.36.0-wmf.21/extensions/CirrusSearch/includes/Searcher.php(321): CirrusSearch\Searcher->buildFullTextSearch(string)
#8 /srv/mediawiki/php-1.36.0-wmf.21/extensions/CirrusSearch/includes/Searcher.php(214): CirrusSearch\Searcher->searchTextInternal(string)
#9 /srv/mediawiki/php-1.36.0-wmf.21/extensions/CirrusSearch/includes/CirrusSearch.php(295): CirrusSearch\Searcher->search(CirrusSearch\Search\SearchQuery)
#10 /srv/mediawiki/php-1.36.0-wmf.21/extensions/CirrusSearch/includes/CirrusSearch.php(268): CirrusSearch\CirrusSearch->searchTextReal(CirrusSearch\Search\SearchQuery)
#11 /srv/mediawiki/php-1.36.0-wmf.21/includes/search/SearchEngine.php(95): CirrusSearch\CirrusSearch->doSearchText(string)
#12 /srv/mediawiki/php-1.36.0-wmf.21/includes/search/SearchEngine.php(187): SearchEngine->{closure}()
#13 /srv/mediawiki/php-1.36.0-wmf.21/includes/search/SearchEngine.php(96): SearchEngine->maybePaginate(Closure)
#14 /srv/mediawiki/php-1.36.0-wmf.21/includes/api/ApiQuerySearch.php(103): SearchEngine->searchText(string)
#15 /srv/mediawiki/php-1.36.0-wmf.21/includes/api/ApiQuerySearch.php(47): ApiQuerySearch->run(ApiPageSet)
#16 /srv/mediawiki/php-1.36.0-wmf.21/includes/api/ApiPageSet.php(179): ApiQuerySearch->executeGenerator(ApiPageSet)
#17 /srv/mediawiki/php-1.36.0-wmf.21/includes/api/ApiPageSet.php(143): ApiPageSet->executeInternal(boolean)
#18 /srv/mediawiki/php-1.36.0-wmf.21/includes/api/ApiQuery.php(246): ApiPageSet->execute()
#19 /srv/mediawiki/php-1.36.0-wmf.21/includes/api/ApiMain.php(1607): ApiQuery->execute()
#20 /srv/mediawiki/php-1.36.0-wmf.21/includes/api/ApiMain.php(556): ApiMain->executeAction()
#21 /srv/mediawiki/php-1.36.0-wmf.21/extensions/WikibaseMediaInfo/src/Special/SpecialMediaSearch.php(323): ApiMain->execute()
#22 /srv/mediawiki/php-1.36.0-wmf.21/extensions/WikibaseMediaInfo/src/Special/SpecialMediaSearch.php(82): Wikibase\MediaInfo\Special\SpecialMediaSearch->search(string, string, integer, string)
#23 /srv/mediawiki/php-1.36.0-wmf.21/includes/specialpage/SpecialPage.php(645): Wikibase\MediaInfo\Special\SpecialMediaSearch->execute(NULL)
#24 /srv/mediawiki/php-1.36.0-wmf.21/includes/specialpage/SpecialPageFactory.php(1403): SpecialPage->run(NULL)
#25 /srv/mediawiki/php-1.36.0-wmf.21/includes/MediaWiki.php(310): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#26 /srv/mediawiki/php-1.36.0-wmf.21/includes/MediaWiki.php(945): MediaWiki->performRequest()
#27 /srv/mediawiki/php-1.36.0-wmf.21/includes/MediaWiki.php(548): MediaWiki->main()
#28 /srv/mediawiki/php-1.36.0-wmf.21/index.php(53): MediaWiki->run()
#29 /srv/mediawiki/php-1.36.0-wmf.21/index.php(46): wfIndexMain()
#30 /srv/mediawiki/w/index.php(3): require(string)
#31 {main}

Event Timeline

thcipriani renamed this task from HTTP error: There was a problem during the HTTP request: 504 Gateway Timeout to SparqlClient: 504 Gateway Timeout.Dec 16 2020, 7:41 PM

This specific request was one by me, and the timeout is expected (given certain circumstances)
This code path is known to be unreliable and is never intended to be used for anything other than the current experimentation (T258055), after which it'll be removed again.
There is no way that any given user can accidentally run into this, as it requires specific URL params (&mediasearch_experimental) to trigger.

I'll leave this ticket open until T258055 is resolved and this code path is removed entirely, but this is known, has no impact, and completely safe to ignore.

@matthiasmullie can we close this ticket now that T258055 is resolved?

Change 655888 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Remove experimental entity traversing search profile

https://gerrit.wikimedia.org/r/655888

The code still hasn't been removed, so we should probably keep this one open until the actual code is gone.
I had resolved T258055 because we have the answers that we need (but maybe I should've kept it open until all relevant code is also gone)

There is a patch already in code review - I've just updated it so that it also references this ticket, and will move this ticket to "code review" to reflect that.

Change 655888 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Remove experimental entity traversing search profile

https://gerrit.wikimedia.org/r/655888