For the last few days, we've seen a strange pattern in s3, where it has spikes of connections which causes slowdowns on MW:
For all those spikes, the queries I have seen being stuck are always the following and always on ruwikinews:
{P12497}
Right now, we just had another spike and I saw the connections real-time:
root@cumin1001:~# mysql.py -hdb2127 -e "show processlist" | grep Dyna 387981061 wikiuser 10.192.0.169:34066 ruwikinews Query 52 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 387990014 wikiuser 10.192.16.18:53876 ruwikinews Query 49 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 387991675 wikiuser 10.192.0.74:50774 ruwikinews Query 54 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388000813 wikiuser 10.192.16.18:58468 ruwikinews Query 46 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388004230 wikiuser 10.192.16.16:43216 ruwikinews Query 39 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388006075 wikiuser 10.192.0.74:60304 ruwikinews Query 36 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388007145 wikiuser 10.192.0.75:44164 ruwikinews Query 35 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388007438 wikiuser 10.192.0.75:45230 ruwikinews Query 53 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388008933 wikiuser 10.192.48.102:47602 ruwikinews Query 50 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388008966 wikiuser 10.192.0.73:36132 ruwikinews Query 37 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388010044 wikiuser 10.192.48.101:55732 ruwikinews Query 47 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388010108 wikiuser 10.192.16.67:53434 ruwikinews Query 47 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388010667 wikiuser 10.192.16.17:44212 ruwikinews Query 30 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388010788 wikiuser 10.192.48.100:54416 ruwikinews Query 45 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388011198 wikiuser 10.192.0.69:40746 ruwikinews Query 37 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388011607 wikiuser 10.192.16.5:51930 ruwikinews Query 44 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388011740 wikiuser 10.192.16.68:52432 ruwikinews Query 44 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388011917 wikiuser 10.192.16.48:52130 ruwikinews Query 43 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388012732 wikiuser 10.192.16.68:55476 ruwikinews Query 29 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388012801 wikiuser 10.192.16.68:55676 ruwikinews Query 41 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388012834 wikiuser 10.192.48.100:33156 ruwikinews Query 41 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388013095 wikiuser 10.192.0.72:58694 ruwikinews Query 33 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388014183 wikiuser 10.192.16.6:33602 ruwikinews Query 33 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388014454 wikiuser 10.192.48.100:37726 ruwikinews Query 37 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388014580 wikiuser 10.192.16.67:35172 ruwikinews Query 37 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388014619 wikiuser 10.192.0.75:42876 ruwikinews Query 37 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388014802 wikiuser 10.192.0.75:43520 ruwikinews Query 36 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388014956 wikiuser 10.192.16.17:55610 ruwikinews Query 37 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388015176 wikiuser 10.192.0.75:44540 ruwikinews Query 36 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388015359 wikiuser 10.192.48.104:51134 ruwikinews Query 36 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388016047 wikiuser 10.192.16.6:39942 ruwikinews Query 35 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388016227 wikiuser 10.192.16.6:40482 ruwikinews Query 34 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388017162 wikiuser 10.192.16.67:41766 ruwikinews Query 33 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388017205 wikiuser 10.192.16.17:33972 ruwikinews Query 32 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388017488 wikiuser 10.192.48.104:57378 ruwikinews Query 32 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388017862 wikiuser 10.192.48.100:47356 ruwikinews Query 23 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388018135 wikiuser 10.192.16.16:55116 ruwikinews Query 30 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388018146 wikiuser 10.192.16.6:46968 ruwikinews Query 31 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388018195 wikiuser 10.192.16.67:44400 ruwikinews Query 31 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388018641 wikiuser 10.192.0.75:55136 ruwikinews Query 30 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388019971 wikiuser 10.192.48.103:50462 ruwikinews Query 27 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388020206 wikiuser 10.192.16.68:47204 ruwikinews Query 27 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388020340 wikiuser 10.192.48.101:53686 ruwikinews Query 27 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388020955 wikiuser 10.192.48.102:48446 ruwikinews Query 25 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388021208 wikiuser 10.192.16.16:35144 ruwikinews Query 25 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388021891 wikiuser 10.192.16.18:52918 ruwikinews Query 24 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388021980 wikiuser 10.192.0.73:47628 ruwikinews Query 24 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388022370 wikiuser 10.192.16.18:54344 ruwikinews Query 23 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388022399 wikiuser 10.192.16.18:54412 ruwikinews Query 8 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388023232 wikiuser 10.192.0.72:35724 ruwikinews Query 21 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388023317 wikiuser 10.192.0.75:43656 ruwikinews Query 21 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388023337 wikiuser 10.192.0.72:36008 ruwikinews Query 21 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388023570 wikiuser 10.192.16.17:54354 ruwikinews Query 20 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388024099 wikiuser 10.192.16.5:40490 ruwikinews Query 20 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388024530 wikiuser 10.192.16.68:57922 ruwikinews Query 4 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388024867 wikiuser 10.192.48.101:39290 ruwikinews Query 17 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388025994 wikiuser 10.192.0.74:37914 ruwikinews Query 15 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388026484 wikiuser 10.192.0.75:55814 ruwikinews Query 14 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388027705 wikiuser 10.192.0.76:42602 ruwikinews Query 12 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388027778 wikiuser 10.192.48.103:44516 ruwikinews Query 11 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388028004 wikiuser 10.192.0.69:32790 ruwikinews Query 11 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388028938 wikiuser 10.192.48.103:47500 ruwikinews Query 9 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388029186 wikiuser 10.192.16.5:60388 ruwikinews Query 8 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388029331 wikiuser 10.192.0.73:39988 ruwikinews Query 8 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388029665 wikiuser 10.192.16.17:44570 ruwikinews Query 8 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388029870 wikiuser 10.192.0.76:49180 ruwikinews Query 7 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388029943 wikiuser 10.192.48.103:50534 ruwikinews Query 7 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388030081 wikiuser 10.192.48.102:48454 ruwikinews Query 7 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388030087 wikiuser 10.192.16.17:45890 ruwikinews Query 7 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388032627 wikiuser 10.192.48.103:58554 ruwikinews Query 1 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000 388032969 wikiuser 10.192.0.176:40182 ruwikinews Query 0 Copying to tmp table SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp 0.000
That query isn't super cheap, but it is also not extremely bad.
[email protected][ruwikinews]> SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp FROM `page` LEFT JOIN `flaggedpages` ON ((page_id = fp_page_id)) INNER JOIN `categorylinks` `c1` ON ((page_id = c1.cl_from) AND (c1.cl_to='Опубликовано')) INNER JOIN `categorylinks` `c2` ON ((page_id = c2.cl_from) AND (c2.cl_to='Материалы_PanARMENIAN.Net')) LEFT OUTER JOIN `categorylinks` `c3` ON ((page_id = c3.cl_from) AND (c3.cl_to='Не_публиковать')) LEFT OUTER JOIN `categorylinks` `c4` ON ((page_id = c4.cl_from) AND (c4.cl_to='Ожидаемые_события_по_датам')) LEFT OUTER JOIN `categorylinks` `c5` ON ((page_id = c5.cl_from) AND (c5.cl_to='Архивные_новости')) LEFT OUTER JOIN `categorylinks` `c6` ON ((page_id = c6.cl_from) AND (c6.cl_to='Викиновости_коротко')) WHERE page_namespace = 0 AND (fp_stable IS NOT NULL) AND page_is_redirect = 0 AND c3.cl_to IS NULL AND c4.cl_to IS NULL AND c5.cl_to IS NULL AND c6.cl_to IS NULL ORDER BY page_id DESC LIMIT 18; +----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+ | page_namespace | page_title | cl_timestamp | +----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+ | 0 | В_США_10-летний_мальчик_собрал_более_$300_тысяч_на_бронежилеты_для_военных_собак | 2020-09-05 14:05:53 | | 0 | В_Минске_задержали_студентов,_вышедших_поддержать_задержанных_ранее_студентов | 2020-09-05 14:05:24 | | 0 | В_Армении_ещё_3_человека_умерли_от_алкогольного_отравления | 2020-09-05 11:15:34 | | 0 | В_Арцахе_выявлено_2_новых_случая_коронавируса | 2020-09-05 11:15:09 | | 0 | Минобороны_РА:_Для_Армении_неприемлемы_попытки_вовлечения_новых_государств_в_карабахский_конфликт | 2020-09-05 10:35:09 | | 0 | Россия_ввела_санкции_против_Порошенко_и_солиста_«Океана_Эльзы» | 2020-09-05 09:45:12 | | 0 | В_Армении_могут_внедрить_плату_за_утилизацию_автомобилей | 2020-09-05 07:45:08 | | 0 | В_Иране_более_200_человек_пострадали_в_результате_взрыва_баллона_с_хлором | 2020-09-05 07:15:15 | | 0 | В_Армении_осталось_менее_4000_активных_больных_коронавирусом | 2020-09-05 07:15:06 | | 0 | Нарушителям_карантинного_режима_в_Армении_будут_грозить_штрафы_и_арест | 2020-09-04 15:15:05 | | 0 | Военная_техника_США_прибыла_в_Грузию_для_участия_в_учениях_Noble_Partner_2020 | 2020-09-04 14:45:06 | | 0 | В_США_7_полицейских_уволены_после_смерти_афроамериканца | 2020-09-04 14:35:09 | | 0 | ВОЗ_не_ожидает_массовой_вакцинации_от_Covid-19_до_середины_2021_года | 2020-09-04 14:05:06 | | 0 | NYT:_Трамп_может_вывести_США_из_НАТО | 2020-09-04 13:45:08 | | 0 | Более_100_евродепутатов_требуют_провести_международное_расследование_отравления_Навального | 2020-09-04 12:55:08 | | 0 | Российская_вакцина_от_Covid-19_поступила_в_медцентры | 2020-09-04 12:15:07 | | 0 | В_Грузии_за_сутки_выявлено_28_случаев_коронавируса | 2020-09-04 12:05:10 | | 0 | Число_случаев_коронавируса_в_Арцахе_превысило_300 | 2020-09-04 10:45:19 | +----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+ 18 rows in set (2.282 sec) [email protected][ruwikinews]> explain SELECT /* DynamicPageListHooks::renderDynamicPageList */ page_namespace,page_title,c1.cl_timestamp FROM `page` LEFT JOIN `flaggedpages` ON ((page_id = fp_page_id)) INNER JOIN `categorylinks` `c1` ON ((page_id = c1.cl_from) AND (c1.cl_to='Опубликовано')) INNER JOIN `categorylinks` `c2` ON ((page_id = c2.cl_from) AND (c2.cl_to='Материалы_PanARMENIAN.Net')) LEFT OUTER JOIN `categorylinks` `c3` ON ((page_id = c3.cl_from) AND (c3.cl_to='Не_публиковать')) LEFT OUTER JOIN `categorylinks` `c4` ON ((page_id = c4.cl_from) AND (c4.cl_to='Ожидаемые_события_по_датам')) LEFT OUTER JOIN `categorylinks` `c5` ON ((page_id = c5.cl_from) AND (c5.cl_to='Архивные_новости')) LEFT OUTER JOIN `categorylinks` `c6` ON ((page_id = c6.cl_from) AND (c6.cl_to='Викиновости_коротко')) WHERE page_namespace = 0 AND (fp_stable IS NOT NULL) AND page_is_redirect = 0 AND c3.cl_to IS NULL AND c4.cl_to IS NULL AND c5.cl_to IS NULL AND c6.cl_to IS NULL ORDER BY page_id DESC LIMIT 18; +------+-------------+--------------+--------+------------------------------------------------+--------------+---------+-----------------------------+--------+-----------------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+--------------+--------+------------------------------------------------+--------------+---------+-----------------------------+--------+-----------------------------------------------------------+ | 1 | SIMPLE | c2 | ref | PRIMARY,cl_timestamp,cl_sortkey | cl_timestamp | 257 | const | 153660 | Using where; Using index; Using temporary; Using filesort | | 1 | SIMPLE | c1 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where | | 1 | SIMPLE | page | eq_ref | PRIMARY,name_title,page_redirect_namespace_len | PRIMARY | 4 | ruwikinews.c2.cl_from | 1 | Using where | | 1 | SIMPLE | c3 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists | | 1 | SIMPLE | c4 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists | | 1 | SIMPLE | c5 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists | | 1 | SIMPLE | c6 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists | | 1 | SIMPLE | flaggedpages | eq_ref | PRIMARY | PRIMARY | 4 | ruwikinews.c2.cl_from | 1 | Using where | +------+-------------+--------------+--------+------------------------------------------------+--------------+---------+-----------------------------+--------+-----------------------------------------------------------+ 8 rows in set (0.035 sec)
It is impossible say whether that is the cause of the slowdowns or the consequence (something else overloading the host and this query getting stuck).
However it looks like the spikes are following some sort of pattern
The query killer kicks in and start killing queries, and those are the ones always being killed.
This started happening on Sunday apparently and whilst yesterday it only hit early in the morning, this probably deserves some investigation as it is triggering MW alerts:
@Krinkle created a document on Sunday about this issue on Sunday when we first responded to it: https://docs.google.com/document/u/1/d/1fzvcma-05RUMuKzFvsOINEbygSSdq96FXz2HSO3TN10/edit#