Page MenuHomePhabricator

Special:Contributions fails to load contributions with relatively small limit for high-volume users
Open, MediumPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.1

message
WMFTimeoutException from line 41 of /srv/mediawiki/wmf-config/set-time-limit.php: the execution time limit of 60 seconds was exceeded

Impact

It is impossible to load Special:Contributions for high volume users, even with sane &limit and filter contribution. Example failure URLs:

Notes

Original report

I was trying to fetch my contributions in the Wikidata namespace on Wikidata, but I get an internal error:

https://www.wikidata.org/w/index.php?target=Jon+Harald+S%C3%B8by&namespace=4&tagfilter=&start=&end=&limit=500&title=Special%3AContributions

Details

Request ID
53482bff-abbf-4e59-bd16-5694e0b4dfce
Stack Trace
[Exception WMFTimeoutException] (/srv/mediawiki/wmf-config/set-time-limit.php:41) the execution time limit of 60 seconds was exceeded
  #0 /srv/mediawiki/php-1.36.0-wmf.1/includes/exception/MWExceptionHandler.php(208): {closure}(integer)
  #1 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
  #2 /srv/mediawiki/php-1.36.0-wmf.1/includes/libs/rdbms/database/DatabaseMysqli.php(46): mysqli->query(string)
  #3 /srv/mediawiki/php-1.36.0-wmf.1/includes/libs/rdbms/database/Database.php(1372): Wikimedia\Rdbms\DatabaseMysqli->doQuery(string)
  #4 /srv/mediawiki/php-1.36.0-wmf.1/includes/libs/rdbms/database/Database.php(1290): Wikimedia\Rdbms\Database->executeQueryAttempt(string, string, boolean, string, integer)
  #5 /srv/mediawiki/php-1.36.0-wmf.1/includes/libs/rdbms/database/Database.php(1223): Wikimedia\Rdbms\Database->executeQuery(string, string, integer)
  #6 /srv/mediawiki/php-1.36.0-wmf.1/includes/libs/rdbms/database/Database.php(1903): Wikimedia\Rdbms\Database->query(string, string, integer)
  #7 /srv/mediawiki/php-1.36.0-wmf.1/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
  #8 /srv/mediawiki/php-1.36.0-wmf.1/includes/libs/rdbms/database/DBConnRef.php(313): Wikimedia\Rdbms\DBConnRef->__call(string, array)
  #9 /srv/mediawiki/php-1.36.0-wmf.1/includes/specials/pagers/ContribsPager.php(201): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
  #10 /srv/mediawiki/php-1.36.0-wmf.1/includes/pager/IndexPager.php(280): ContribsPager->reallyDoQuery(string, integer, boolean)
  #11 /srv/mediawiki/php-1.36.0-wmf.1/includes/pager/IndexPager.php(733): IndexPager->doQuery()
  #12 /srv/mediawiki/php-1.36.0-wmf.1/includes/specials/SpecialContributions.php(242): IndexPager->getNumRows()
  #13 /srv/mediawiki/php-1.36.0-wmf.1/includes/specialpage/SpecialPage.php(600): SpecialContributions->execute(NULL)
  #14 /srv/mediawiki/php-1.36.0-wmf.1/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(NULL)
  #15 /srv/mediawiki/php-1.36.0-wmf.1/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
  #16 /srv/mediawiki/php-1.36.0-wmf.1/includes/MediaWiki.php(940): MediaWiki->performRequest()
  #17 /srv/mediawiki/php-1.36.0-wmf.1/includes/MediaWiki.php(543): MediaWiki->main()
  #18 /srv/mediawiki/php-1.36.0-wmf.1/index.php(53): MediaWiki->run()
  #19 /srv/mediawiki/php-1.36.0-wmf.1/index.php(46): wfIndexMain()
  #20 /srv/mediawiki/w/index.php(3): require(string)
  #21 {main}

Event Timeline

jhsoby created this task.Jul 2 2020, 9:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 2 2020, 9:11 PM
CDanis reopened this task as Open.EditedJul 27 2020, 12:55 PM
CDanis added a subscriber: CDanis.

This was not a duplicate, and the issue still exists.

T234450 had a misleading title; it isn't about any WMFTimeoutException on Special:Contributions, but a particular special kind from months ago that was creating widespread database issues, because of excessive traffic from a scraper.

It works for lower limits like 1 - https://www.wikidata.org/w/index.php?target=Jon+Harald+S%C3%B8by&namespace=4&tagfilter=&start=&end=&limit=1&title=Special%3AContributions

But when trying to load older edits it can take a small time
https://www.wikidata.org/w/index.php?title=Special:Contributions&offset=20180920162533&target=Jon+Harald+S%C3%B8by&namespace=4&tagfilter=&start=&end=

Select should not have extras, as this is a simple namespace selection and there should be a index for action + namespaces which can found the rows, even the selected namespaces does not have many rows compared to the rest of the revisions.

SELECT rev_id, 
       rev_page, 
       rev_timestamp, 
       rev_minor_edit, 
       rev_deleted, 
       rev_len, 
       rev_parent_id, 
       rev_sha1, 
       comment_rev_comment.comment_text AS `rev_comment_text`, 
       comment_rev_comment.comment_data AS `rev_comment_data`, 
       comment_rev_comment.comment_id   AS `rev_comment_cid`, 
       actor_rev_user.actor_user        AS `rev_user`, 
       actor_rev_user.actor_name        AS `rev_user_text`, 
       temp_rev_user.revactor_actor     AS `rev_actor`, 
       page_namespace, 
       page_title, 
       page_id, 
       page_latest, 
       page_is_redirect, 
       page_len, 
       user_name, 
       page_is_new, 
       (SELECT Group_concat(ctd_name SEPARATOR ',') 
        FROM   `change_tag` 
               JOIN `change_tag_def` 
                 ON (( ct_tag_id = ctd_id )) 
        WHERE  ct_rev_id = rev_id)      AS `ts_tags` 
FROM   `revision` 
       JOIN `revision_comment_temp` `temp_rev_comment` 
         ON (( temp_rev_comment.revcomment_rev = rev_id )) 
       JOIN `comment` `comment_rev_comment` 
         ON (( comment_rev_comment.comment_id = 
             temp_rev_comment.revcomment_comment_id )) 
       JOIN `revision_actor_temp` `temp_rev_user` 
         ON (( temp_rev_user.revactor_rev = rev_id )) 
       JOIN `actor` `actor_rev_user` 
         ON (( actor_rev_user.actor_id = temp_rev_user.revactor_actor )) 
       JOIN `page` 
         ON (( page_id = rev_page )) 
       LEFT JOIN `user` 
              ON ( ( actor_rev_user.actor_user != 0 ) 
                   AND ( user_id = actor_rev_user.actor_user ) ) 
WHERE  (( temp_rev_user.revactor_actor = ????? )) 
       AND ( page_namespace = 4 ) 
       AND ( ( rev_deleted & 4 ) = 0 ) 
ORDER  BY rev_timestamp DESC, 
          rev_id DESC 
LIMIT  501

[I have no idea about the actor id for this user]

Urbanecm renamed this task from Internal error on Special:Contributions in Wikidata to Special:Contributions fails to load contributions with relatively small limit for high-volume users.Aug 3 2020, 1:10 PM
Urbanecm updated the task description. (Show Details)
Restricted Application added a subscriber: Cyberpower678. · View Herald TranscriptAug 3 2020, 1:10 PM
Urbanecm changed the subtype of this task from "Task" to "Production Error".Aug 3 2020, 1:10 PM
Urbanecm set Request ID to 53482bff-abbf-4e59-bd16-5694e0b4dfce.
Urbanecm edited Stack Trace. (Show Details)
Urbanecm edited Stack Trace. (Show Details)
eprodromou triaged this task as Medium priority.Tue, Sep 15, 8:19 PM