Page MenuHomePhabricator

Watchlist is not viewable
Closed, DuplicatePublic

Description

Many users in Russian Wikipedia including me getting this error while trying to browse the watchlist. I have about 10 000 articles in this list. The problem was temporarily resolved after deleting all special pages from the view. Next day the error message was displayed again with shortened list.

[WXKeIgpAMCYAAFuSjlwAAAAP] 2017-07-22 00:37:50: Fatal exception of type «Wikimedia\Rdbms\DBQueryError»

Event Timeline

I think the TLDR is Your watchlist seems to be far too big

2017-07-22 00:37:50 [WXKeIgpAMCYAAFuSjlwAAAAP] mw1210 ruwiki 1.30.0-wmf.10 exception ERROR: [WXKeIgpAMCYAAFuSjlwAAAAP] /wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BD%D0%B0%D0%B1%D0%BB%D1%8E%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F   Wikimedia\Rdbms\DBQueryError from line 1145 of /srv/mediawiki/php-1.30.0-wmf.10/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT  rc_id,rc_timestamp,rc_user,rc_user_text,rc_namespace,rc_title,rc_comment,rc_minor,rc_bot,rc_new,rc_cur_id,rc_this_oldid,rc_last_oldid,rc_type,rc_source,rc_patrolled,rc_ip,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,wl_notificationtimestamp,page_latest,(SELECT  GROUP_CONCAT(ct_tag SEPARATOR ',')  FROM `change_tag`    WHERE ct_rc_id=rc_id  ) AS `ts_tags`,fp_stable,fp_pending_since,ores_damaging_cls.oresc_probability AS `ores_damaging_score`,ores_goodfaith_cls.oresc_probability AS `ores_goodfaith_score`  FROM `recentchanges` INNER JOIN `watchlist` ON (wl_user = '24482' AND (wl_namespace=rc_namespace) AND (wl_title=rc_title)) LEFT JOIN `page` ON ((rc_cur_id=page_id)) LEFT JOIN `flaggedpages` ON ((fp_page_id = rc_cur_id)) LEFT JOIN `ores_model` `ores_damaging_mdl` ON (ores_damaging_mdl.oresm_is_current = '1' AND ores_damaging_mdl.oresm_name = 'damaging') LEFT JOIN `ores_classification` `ores_damaging_cls` ON ((ores_damaging_cls.oresc_model = ores_damaging_mdl.oresm_id) AND (rc_this_oldid = ores_damaging_cls.oresc_rev) AND ores_damaging_cls.oresc_class = '1') LEFT JOIN `ores_model` `ores_goodfaith_mdl` ON (ores_goodfaith_mdl.oresm_is_current = '1' AND ores_goodfaith_mdl.oresm_name = 'goodfaith') LEFT JOIN `ores_classification` `ores_goodfaith_cls` ON ((ores_goodfaith_cls.oresc_model = ores_goodfaith_mdl.oresm_id) AND (rc_this_oldid = ores_goodfaith_cls.oresc_rev) AND ores_goodfaith_cls.oresc_class = '1')   WHERE (rc_type != '6') AND (rc_source != 'wb') AND (rc_timestamp > '20170715003650') AND ((rc_this_oldid=page_latest) OR rc_type IN ('3','142') ) AND ((rc_type != 3) OR ((rc_deleted & 1) != 1))  ORDER BY rc_timestamp DESC
Function: SpecialWatchlist::doMainQuery
Error: 2062 Read timeout is reached (10.64.16.26)
 {"exception_id":"WXKeIgpAMCYAAFuSjlwAAAAP","caught_by":"mwe_handler"}
[Exception Wikimedia\Rdbms\DBQueryError] (/srv/mediawiki/php-1.30.0-wmf.10/includes/libs/rdbms/database/Database.php:1145) A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT  rc_id,rc_timestamp,rc_user,rc_user_text,rc_namespace,rc_title,rc_comment,rc_minor,rc_bot,rc_new,rc_cur_id,rc_this_oldid,rc_last_oldid,rc_type,rc_source,rc_patrolled,rc_ip,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,wl_notificationtimestamp,page_latest,(SELECT  GROUP_CONCAT(ct_tag SEPARATOR ',')  FROM `change_tag`    WHERE ct_rc_id=rc_id  ) AS `ts_tags`,fp_stable,fp_pending_since,ores_damaging_cls.oresc_probability AS `ores_damaging_score`,ores_goodfaith_cls.oresc_probability AS `ores_goodfaith_score`  FROM `recentchanges` INNER JOIN `watchlist` ON (wl_user = '24482' AND (wl_namespace=rc_namespace) AND (wl_title=rc_title)) LEFT JOIN `page` ON ((rc_cur_id=page_id)) LEFT JOIN `flaggedpages` ON ((fp_page_id = rc_cur_id)) LEFT JOIN `ores_model` `ores_damaging_mdl` ON (ores_damaging_mdl.oresm_is_current = '1' AND ores_damaging_mdl.oresm_name = 'damaging') LEFT JOIN `ores_classification` `ores_damaging_cls` ON ((ores_damaging_cls.oresc_model = ores_damaging_mdl.oresm_id) AND (rc_this_oldid = ores_damaging_cls.oresc_rev) AND ores_damaging_cls.oresc_class = '1') LEFT JOIN `ores_model` `ores_goodfaith_mdl` ON (ores_goodfaith_mdl.oresm_is_current = '1' AND ores_goodfaith_mdl.oresm_name = 'goodfaith') LEFT JOIN `ores_classification` `ores_goodfaith_cls` ON ((ores_goodfaith_cls.oresc_model = ores_goodfaith_mdl.oresm_id) AND (rc_this_oldid = ores_goodfaith_cls.oresc_rev) AND ores_goodfaith_cls.oresc_class = '1')   WHERE (rc_type != '6') AND (rc_source != 'wb') AND (rc_timestamp > '20170715003650') AND ((rc_this_oldid=page_latest) OR rc_type IN ('3','142') ) AND ((rc_type != 3) OR ((rc_deleted & 1) != 1))  ORDER BY rc_timestamp DESC
Function: SpecialWatchlist::doMainQuery
Error: 2062 Read timeout is reached (10.64.16.26)

  #0 /srv/mediawiki/php-1.30.0-wmf.10/includes/libs/rdbms/database/Database.php(975): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  #1 /srv/mediawiki/php-1.30.0-wmf.10/includes/libs/rdbms/database/Database.php(1339): Wikimedia\Rdbms\Database->query(string, string)
  #2 /srv/mediawiki/php-1.30.0-wmf.10/includes/specials/SpecialWatchlist.php(360): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
  #3 /srv/mediawiki/php-1.30.0-wmf.10/includes/specialpage/ChangesListSpecialPage.php(577): SpecialWatchlist->doMainQuery(array, array, array, array, array, FormOptions)
  #4 /srv/mediawiki/php-1.30.0-wmf.10/includes/specialpage/ChangesListSpecialPage.php(519): ChangesListSpecialPage->getRows()
  #5 /srv/mediawiki/php-1.30.0-wmf.10/includes/specials/SpecialWatchlist.php(92): ChangesListSpecialPage->execute(NULL)
  #6 /srv/mediawiki/php-1.30.0-wmf.10/includes/specialpage/SpecialPage.php(522): SpecialWatchlist->execute(NULL)
  #7 /srv/mediawiki/php-1.30.0-wmf.10/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
  #8 /srv/mediawiki/php-1.30.0-wmf.10/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
  #9 /srv/mediawiki/php-1.30.0-wmf.10/includes/MediaWiki.php(867): MediaWiki->performRequest()
  #10 /srv/mediawiki/php-1.30.0-wmf.10/includes/MediaWiki.php(523): MediaWiki->main()
  #11 /srv/mediawiki/php-1.30.0-wmf.10/index.php(43): MediaWiki->run()
  #12 /srv/mediawiki/w/index.php(3): include(string)
  #13 {main}

The default watchlist view runs a query without a LIMIT (!!). I have a WIP patch that fixes this as part of a much larger refactor, but for the time being you could work around this problem by enabling the "enhanced watchlist" preference ("Expand watchlist to show all changes, not just the most recent"), because that mode does use a LIMIT.