Page MenuHomePhabricator

Query time out in ApiQueryLogEvents query
Closed, DuplicatePublic

Description

Request:

{
	"format": "json",
	"action": "query",
	"list": "logevents",
	"rawcontinue": "1",
	"leprop": "title|timestamp|type",
	"leaction": "upload/upload",
	"leuser": "…",
	"lelimit": "30",
	"ledir": "older"
}
2021-05-06 22:31:03 [caef8fe6-1da3-4c11-a8ea-e0553978eec0] mw1281 commonswiki 1.37.0-wmf.4 exception ERROR: [caef8fe6-1da3-4c11-a8ea-e0553978eec0] /w/api.php   Wikimedia\Rdbms\DBQueryDisconnectedError: A connection error occurred during a query.
Query: SELECT  /*! STRAIGHT_JOIN */ log_id,log_type,log_action,log_timestamp,log_deleted,log_namespace,log_title  FROM `logging` IGNORE INDEX (times) JOIN `actor` ON ((actor_id=log_actor)) LEFT JOIN `page` ON ((log_namespace=page_namespace) AND (log_title=page_title))   WHERE (log_type != 'urlshortener') AND log_type = 'upload' AND log_action = 'upload' AND actor_name = '…'  ORDER BY log_timestamp DESC,log_id DESC LIMIT 31
Function: ApiQueryLogEvents::execute
Error: 2006 MySQL server has gone away (10.64.0.220)
 {"exception_url":"/w/api.php","reqId":"caef8fe6-1da3-4c11-a8ea-e0553978eec0","caught_by":"entrypoint"}
[Exception Wikimedia\Rdbms\DBQueryDisconnectedError] (/srv/mediawiki/php-1.37.0-wmf.4/includes/libs/rdbms/database/Database.php:1736) A connection error occurred during a query.
Query: SELECT  /*! STRAIGHT_JOIN */ log_id,log_type,log_action,log_timestamp,log_deleted,log_namespace,log_title  FROM `logging` IGNORE INDEX (times) JOIN `actor` ON ((actor_id=log_actor)) LEFT JOIN `page` ON ((log_namespace=page_namespace) AND (log_title=page_title))   WHERE (log_type != 'urlshortener') AND log_type = 'upload' AND log_action = 'upload' AND actor_name = '…'  ORDER BY log_timestamp DESC,log_id DESC LIMIT 31
Function: ApiQueryLogEvents::execute
Error: 2006 MySQL server has gone away (10.64.0.220)

  #0 /srv/mediawiki/php-1.37.0-wmf.4/includes/libs/rdbms/database/Database.php(1722): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
  #1 /srv/mediawiki/php-1.37.0-wmf.4/includes/libs/rdbms/database/Database.php(1697): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
  #2 /srv/mediawiki/php-1.37.0-wmf.4/includes/libs/rdbms/database/Database.php(1260): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  #3 /srv/mediawiki/php-1.37.0-wmf.4/includes/libs/rdbms/database/Database.php(1948): Wikimedia\Rdbms\Database->query(string, string, integer)
  #4 /srv/mediawiki/php-1.37.0-wmf.4/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(614): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
  #5 /srv/mediawiki/php-1.37.0-wmf.4/includes/api/ApiQueryBase.php(427): Wikimedia\Rdbms\SelectQueryBuilder->fetchResultSet()
  #6 /srv/mediawiki/php-1.37.0-wmf.4/includes/api/ApiQueryLogEvents.php(253): ApiQueryBase->select(string)
  #7 /srv/mediawiki/php-1.37.0-wmf.4/includes/api/ApiQuery.php(326): ApiQueryLogEvents->execute()
  #8 /srv/mediawiki/php-1.37.0-wmf.4/includes/api/ApiMain.php(1668): ApiQuery->execute()
  #9 /srv/mediawiki/php-1.37.0-wmf.4/includes/api/ApiMain.php(638): ApiMain->executeAction()
  #10 /srv/mediawiki/php-1.37.0-wmf.4/includes/api/ApiMain.php(609): ApiMain->executeActionWithErrorHandling()
  #11 /srv/mediawiki/php-1.37.0-wmf.4/api.php(90): ApiMain->execute()
  #12 /srv/mediawiki/php-1.37.0-wmf.4/api.php(45): wfApiMain()
  #13 /srv/mediawiki/w/api.php(3): require(string)
  #14 {main}

Event Timeline

Does this warrant a rollback?

After discussion with @thcipriani: Rolling back to group0 given the number of these seen since this version hit commons. Abundance of caution etc. etc.

brennen triaged this task as Unbreak Now! priority.May 6 2021, 11:50 PM

Mentioned in SAL (#wikimedia-operations) [2021-05-06T23:50:50Z] <brennen@deploy1002> rebuilt and synchronized wikiversions files: Rollback group1 and group2 to 1.37.0-wmf.3 (T282193)

Change 685954 had a related patch set uploaded (by Brennen Bearnes; author: Brennen Bearnes):

[operations/mediawiki-config@master] Rollback group1 and group2 to 1.37.0-wmf.3 (T282193)

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

Change 685954 merged by jenkins-bot:

[operations/mediawiki-config@master] Rollback group1 and group2 to 1.37.0-wmf.3 (T282193)

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