Anomie added a subscriber: Anomie. Anomie added a project: database. Anomie added a comment.
The three logged exceptions all look like this: 2015-06-03 19:36:26 mw1148 wikidatawiki exception INFO: [8ae26643] /w/api.php?rcprop=user%7Ccomment%7Ctimestamp%7Ctitle%7Cids%7Csizes%7Credirect%7Cloginfo%7Cflags&maxlag=5&format=json&rclimit=5&list=recentchanges&rcnamespace=6%7C7&rcshow=&continue=&meta=userinfo&indexpageids=&action=query&uiprop=blockinfo%7Chasmsg DBQueryError from line 1276 of /srv/mediawiki/php-1.26wmf8/includes/db/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT rc_id,rc_timestamp,rc_namespace,rc_title,rc_cur_id,rc_type,rc_deleted,rc_this_oldid,rc_last_oldid,rc_comment,rc_user,rc_user_text,rc_minor,rc_type,rc_bot,rc_old_len,rc_new_len,rc_logid,rc_log_type,rc_log_action,rc_params,page_is_redirect FROM `recentchanges` FORCE INDEX (rc_timestamp) LEFT JOIN `page` ON ((rc_namespace=page_namespace) AND (rc_title=page_title)) WHERE rc_namespace IN ('6','7') AND rc_type IN ('0','1','3') ORDER BY rc_timestamp DESC,rc_id DESC LIMIT 6 Function: ApiQueryRecentChanges::run Error: 2013 Lost connection to MySQL server during query (10.64.16.144) #0 /srv/mediawiki/php-1.26wmf8/includes/db/Database.php(1214): DatabaseBase->reportQueryError() #1 /srv/mediawiki/php-1.26wmf8/includes/db/Database.php(1756): DatabaseBase->query() #2 /srv/mediawiki/php-1.26wmf8/includes/api/ApiQueryBase.php(376): DatabaseBase->select() #3 /srv/mediawiki/php-1.26wmf8/includes/api/ApiQueryRecentChanges.php(367): ApiQueryBase->select() #4 /srv/mediawiki/php-1.26wmf8/includes/api/ApiQueryRecentChanges.php(131): ApiQueryRecentChanges->run() #5 /srv/mediawiki/php-1.26wmf8/includes/api/ApiQuery.php(286): ApiQueryRecentChanges->execute() #6 /srv/mediawiki/php-1.26wmf8/includes/api/ApiMain.php(1131): ApiQuery->execute() #7 /srv/mediawiki/php-1.26wmf8/includes/api/ApiMain.php(469): ApiMain->executeAction() #8 /srv/mediawiki/php-1.26wmf8/includes/api/ApiMain.php(442): ApiMain->executeActionWithErrorHandling() #9 /srv/mediawiki/php-1.26wmf8/api.php(88): ApiMain->execute() #10 /srv/mediawiki/w/api.php(3): include() #11 {main} {"private":false} The "Lost connection to MySQL server during query" usually indicates that the query was taking too long to run and was killed. For this particular query it looks like it was having to scan the whole recentchanges table (around 6.7 million rows, looks like) to find out that there aren't any rows for namespaces 6 or 7. Chances are we should just kill the "FORCE INDEX" in that query and let the database guess when a filesort would make sense, but I'd want to hear from our DBAs before just doing it. The queries here will always be ordering by rc_timestamp,rc_id, and for WHERE: - will usually have an IN on rc_type (possibly rc_source in the future, see discussion on Gerrit 213472 <https://gerrit.wikimedia.org/r/#/c/213472/>), - could have an IN on rc_namespace, as shown here - could have a range on rc_timestamp (<= X, >= X, or both), - could have "rc_timestamp < X OR (rc_timestamp = X AND rc_id <= Y)" (or >; in either case it matches the direction of the order by), - could have testing of various rc_minor/rc_bot/rc_patrolled/rc_user being = or != 0, - could have rc_user_text = X or != X - could have rc_this_oldid = page_latest - could have a join with change_tag with an IN on ct_tag - could have a test for "(rc_deleted & X) != X" TASK DETAIL https://phabricator.wikimedia.org/T101502 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Anomie Cc: Anomie, Aklapper, jayvdb, Krenair, Legoktm, greg, pywikipedia-bugs _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
