Page MenuHomePhabricator

ApiQuerySiteinfo - Exception Caught: No queue partitions available.
Closed, ResolvedPublic

Description

While making a request to https://www.wikidata.org/w/api.php?action=query&meta=siteinfo&format=json&siprop=statistics
during the eqiad->codfw migration test I got

{"servedby":"mw2061","error":{"code":"internal_api_error_JobQueueError","info":"[VxZERQrAAGQAAGdULqIAAAAE] Exception Caught: No queue partitions available."}}

Stacktrace is

addshore@fluorine:/a/mw-log$ cat exception.log |grep -A 20 VxZERQrAAGQAAGdULqIAAAAE
2016-04-19 14:44:21 [VxZERQrAAGQAAGdULqIAAAAE] mw2061 wikidatawiki 1.27.0-wmf.21 exception ERROR: [VxZERQrAAGQAAGdULqIAAAAE] /w/api.php?action=query&meta=siteinfo&format=json&siprop=statistics   JobQueueError from line 495 of /srv/mediawiki/php-1.27.0-wmf.21/includes/jobqueue/JobQueueFederated.php: No queue partitions available. {"exception_id":"VxZERQrAAGQAAGdULqIAAAAE"}
[Exception JobQueueError] (/srv/mediawiki/php-1.27.0-wmf.21/includes/jobqueue/JobQueueFederated.php:495) No queue partitions available.
  #0 /srv/mediawiki/php-1.27.0-wmf.21/includes/jobqueue/JobQueueFederated.php(477): JobQueueFederated->throwErrorIfAllPartitionsDown(integer)
  #1 /srv/mediawiki/php-1.27.0-wmf.21/includes/jobqueue/JobQueue.php(663): JobQueueFederated->doGetSiblingQueueSizes(array)
  #2 /srv/mediawiki/php-1.27.0-wmf.21/includes/jobqueue/JobQueueGroup.php(336): JobQueue->getSiblingQueueSizes(array)
  #3 /srv/mediawiki/php-1.27.0-wmf.21/includes/SiteStats.php(206): JobQueueGroup->getQueueSizes()
  #4 /srv/mediawiki/php-1.27.0-wmf.21/includes/api/ApiQuerySiteinfo.php(473): SiteStats::jobs()
  #5 /srv/mediawiki/php-1.27.0-wmf.21/includes/api/ApiQuerySiteinfo.php(67): ApiQuerySiteinfo->appendStatistics(string)
  #6 /srv/mediawiki/php-1.27.0-wmf.21/includes/api/ApiQuery.php(250): ApiQuerySiteinfo->execute()
  #7 /srv/mediawiki/php-1.27.0-wmf.21/includes/api/ApiMain.php(1365): ApiQuery->execute()
  #8 /srv/mediawiki/php-1.27.0-wmf.21/includes/api/ApiMain.php(468): ApiMain->executeAction()
  #9 /srv/mediawiki/php-1.27.0-wmf.21/includes/api/ApiMain.php(434): ApiMain->executeActionWithErrorHandling()
  #10 /srv/mediawiki/php-1.27.0-wmf.21/api.php(83): ApiMain->execute()
  #11 /srv/mediawiki/w/api.php(3): include(string)
  #12 {main}

This should probably not fail in quite this way

Details

Related Gerrit Patches:

Event Timeline

Addshore created this task.Apr 19 2016, 2:49 PM
Restricted Application added subscribers: TerraCodes, Aklapper. · View Herald TranscriptApr 19 2016, 2:49 PM

It looks like this exception could either be caught at SiteStats::jobs which could return null / 0 or throw another exception.
Or it could be caught in the API module itself and reported as 0, at which point a warning or error could maybe also be appended to the api output

Anomie added a subscriber: Anomie.Apr 19 2016, 5:31 PM

It's unlikely this should be handled in the API, SiteStats::jobs() should return a sensible number. Probably it should be being handled even deeper within the job queue stuff.

Change 284434 had a related patch set uploaded (by Addshore):
Catch JobQueue errors in SiteStats::jobs

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

Change 284434 merged by jenkins-bot:
Catch JobQueue errors in SiteStats::jobs

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

Anomie closed this task as Resolved.Aug 24 2016, 3:47 PM
Anomie assigned this task to Addshore.

I'm going to assume this is fixed since the patch was merged. Feel free to reopen if that's not the case.