Page MenuHomePhabricator

Failures for Cirrus Search dumps for wikidatawiki, zhwiki, enwiki for the 20230703 run
Closed, ResolvedPublic3 Estimated Story Points

Description

I got the following messages in email:

Jul  4 09:16:50 dumpsgen: extensions/CirrusSearch/maintenance/DumpIndex.php failed for /mnt/dumpsdata/otherdumps/cirrussearch/20230703/wikidatawiki-20230703-cirrussearch-content.json.gz
Jul  4 09:16:50 dumpsgen: extensions/CirrusSearch/maintenance/DumpIndex.php failed for /mnt/dumpsdata/otherdumps/cirrussearch/20230703/zhwiki-20230703-cirrussearch-content.json.gz
Jul  4 09:16:50 dumpsgen: extensions/CirrusSearch/maintenance/DumpIndex.php failed for /mnt/dumpsdata/otherdumps/cirrussearch/20230703/enwiki-20230703-cirrussearch-general.json.gz

These three files are indeed missing from the output files. Didn't see anything in logstash right off, in the logs on snapshot1008 I see

Elastica\Exception\ClientException from line 26 of /srv/mediawiki/php-1.41.0-wmf.15/vendor/ruflin/elastica/src/Connection/Strategy/Simple.php: No enabled connection
#0 /srv/mediawiki/php-1.41.0-wmf.15/vendor/ruflin/elastica/src/Connection/ConnectionPool.php(86): Elastica\Connection\Strategy\Simple->getConnection(Array)
#1 /srv/mediawiki/php-1.41.0-wmf.15/vendor/ruflin/elastica/src/Client.php(396): Elastica\Connection\ConnectionPool->getConnection()
#2 /srv/mediawiki/php-1.41.0-wmf.15/vendor/ruflin/elastica/src/Client.php(512): Elastica\Client->getConnection()
#3 /srv/mediawiki/php-1.41.0-wmf.15/vendor/ruflin/elastica/src/Search.php(348): Elastica\Client->request('zhwiki_content/...', 'POST', Array, Array)
#4 /srv/mediawiki/php-1.41.0-wmf.15/extensions/CirrusSearch/includes/Elastica/SearchAfter.php(96): Elastica\Search->search()
#5 /srv/mediawiki/php-1.41.0-wmf.15/extensions/CirrusSearch/includes/Elastica/SearchAfter.php(72): CirrusSearch\Elastica\SearchAfter->runSearch()
#6 /srv/mediawiki/php-1.41.0-wmf.15/extensions/CirrusSearch/maintenance/DumpIndex.php(163): CirrusSearch\Elastica\SearchAfter->next()
#7 /srv/mediawiki/php-1.41.0-wmf.15/maintenance/includes/MaintenanceRunner.php(681): CirrusSearch\Maintenance\DumpIndex->execute()
#8 /srv/mediawiki/php-1.41.0-wmf.15/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#9 /srv/mediawiki/multiversion/MWScript.php(160): require_once('/srv/mediawiki/...')
#10 {main}

and similar for the other two files.

Event Timeline

ArielGlenn triaged this task as High priority.

Adding two more failures:

Jul  4 09:16:50 dumpsgen: extensions/CirrusSearch/maintenance/DumpIndex.php failed for /mnt/dumpsdata/otherdumps/cirrussearch/20230703/mlwiki-20230703-cirrussearch-content.json.gz
Jul  4 09:16:50 dumpsgen: extensions/CirrusSearch/maintenance/DumpIndex.php failed for /mnt/dumpsdata/otherdumps/cirrussearch/20230703/metawiki-20230703-cirrussearch-general.json.gz

These came from different db sections so the script running those finished later, and hence the error report was sent later.

One more to add:

Jul  4 09:16:50 dumpsgen: extensions/CirrusSearch/maintenance/DumpIndex.php failed for /mnt/dumpsdata/otherdumps/cirrussearch/20230703/commonswiki-20230703-cirrussearch-content.json.gz
bking set the point value for this task to 3.Jul 10 2023, 3:34 PM

Sigh, I thought we resolved the no enabled connection problem but clearly not. Looking into it.

Change 936806 had a related patch set uploaded (by Ebernhardson; author: Ebernhardson):

[mediawiki/extensions/Elastica@master] Don't disable the last connection after http error (part deux)

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

It looks like this time we got both the CURLE_COULDNT_CONNECT error, which we handle, along with CURLE_GOT_NOTHING which we do not handle. Rather than playing wack-a-mole with curl error codes I think our best bet is going to be ensuring the connection remains available regardless of which error it was.

Just for my understanding, it looks like the new patch would exception out in the case where there is a failure with the last connection of whatever sort. Am I reading that right? And if so, how does that help us in the current situation? Sorry for whatever I am missing here. Thanks!

The error is No enabled connection. Connections are disabled by the client library any time there is an http error, unless we explicitly re-enable it. In prod we only have one connection, the LVS one, so a single unhandled http failure kills any attempt to talk to elasticsearch for the rest of the script execution.

Change 936806 merged by jenkins-bot:

[mediawiki/extensions/Elastica@master] Don't disable the last connection after http error (part deux)

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