Page MenuHomePhabricator

Elastica\Exception\Connection\HttpException: Unknown error:52
Closed, ResolvedPublic3 Estimated Story PointsPRODUCTION ERROR

Description

Error
  • service.version: 1.46.0-wmf.1
  • timestamp: 2025-11-04T21:18:24.827Z
  • labels.phpversion: 8.1.33
  • trace.id: eba4ad88-733a-4a14-9387-e40191a8c540
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   Elastica\Exception\Connection\HttpException: Unknown error:52
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.1/vendor/ruflin/elastica/src/Transport/Http.php(186)
#0/srv/mediawiki/php-1.46.0-wmf.1/vendor/ruflin/elastica/src/Request.php(183)Elastica\Transport\Http->exec(Elastica\Request, array)
#1/srv/mediawiki/php-1.46.0-wmf.1/vendor/ruflin/elastica/src/Client.php(545)Elastica\Request->send()
#2/srv/mediawiki/php-1.46.0-wmf.1/vendor/ruflin/elastica/src/Search.php(352)Elastica\Client->request(string, string, array, array)
#3/srv/mediawiki/php-1.46.0-wmf.1/vendor/ruflin/elastica/src/Scroll.php(89)Elastica\Search->search()
#4/srv/mediawiki/php-1.46.0-wmf.1/extensions/Translate/src/TtmServer/CrossLanguageTranslationSearchQuery.php(54)Elastica\Scroll->next()
#5/srv/mediawiki/php-1.46.0-wmf.1/extensions/Translate/src/TtmServer/SearchTranslationsSpecialPage.php(141)MediaWiki\Extension\Translate\TtmServer\CrossLanguageTranslationSearchQuery->getDocuments()
#6/srv/mediawiki/php-1.46.0-wmf.1/includes/SpecialPage/SpecialPage.php(711)MediaWiki\Extension\Translate\TtmServer\SearchTranslationsSpecialPage->execute(null)
#7/srv/mediawiki/php-1.46.0-wmf.1/includes/SpecialPage/SpecialPageFactory.php(1736)MediaWiki\SpecialPage\SpecialPage->run(null)
#8/srv/mediawiki/php-1.46.0-wmf.1/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#9/srv/mediawiki/php-1.46.0-wmf.1/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#10/srv/mediawiki/php-1.46.0-wmf.1/includes/MediaWikiEntryPoint.php(184)MediaWiki\Actions\ActionEntryPoint->execute()
#11/srv/mediawiki/php-1.46.0-wmf.1/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#12/srv/mediawiki/w/index.php(3)require(string)
#13{main}
Impact
Notes

Thought this was a strange error, maybe transient.

Details

Request URL
https://wikimania2014.wikimedia.org/w/index.php?filter=*&language=*&offset=*&query=*&title=*
Related Changes in Gerrit:

Event Timeline

Curl error 52 is "Empty reply from server."

Checking the last 2 weeks of logged Elastica HttpException there were 5 total exceptions, fairly low volume.

endpointcountcurl error
translation search352, empty reply from server
web search118, transfer closed with outstanding data remaining
api feature usage156, failure when receiving data from the peer

Only the web search endpoint handled the exception, translation and api feature usage show the exception was caught by the entrypoint.

Initial thoughts:

  • For the most part envoy should paper over these problems with automatic retry. Perhaps the existence of only 5 errors in 2 weeks over millions of requests suggests that mostly works.
  • We shouldn't be allowing transport exceptions to be caught at the entrypoint, they should be caught earlier and return a better error message. Slightly awkward is that we don't own the translation search or the api feature usage search, although we can provide patches and ask for reviews.
  • Verified ttmserver prod configuration. The default connection goes through the same envoy ports as normal search, it should be getting the same transparent retries. Not clear why it would have more empty replies than web search which gets orders of magnitude more requests.

Not sure if we should do anything here or not, will ponder.

pfischer lowered the priority of this task from High to Low.Nov 17 2025, 4:43 PM
pfischer set the point value for this task to 3.

Change #1207112 had a related patch set uploaded (by DCausse; author: DCausse):

[mediawiki/extensions/Translate@master] Wrap elastica exception with TtmServerException

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

Change #1207164 had a related patch set uploaded (by DCausse; author: DCausse):

[mediawiki/extensions/ApiFeatureUsage@master] Ignore errors when suggesting a date range

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

Change #1207112 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Wrap elastica exception with TtmServerException

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

Change #1207164 merged by jenkins-bot:

[mediawiki/extensions/ApiFeatureUsage@master] Ignore errors when suggesting a date range

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