Page MenuHomePhabricator

Watchlist times out
Open, Needs TriagePublic

Description

Hi. While attempting to view new changes or even refresh, my Commons watchlist https://commons.wikimedia.org/w/index.php?hidebots=1&hidecategorization=1&hideWikibase=1&namespace=6&invert=1&limit=1000&days=30&enhanced=1&title=Special:Watchlist&urlversion=2&useskin=monobook is sometimes replaced by "This search has timed out. You may wish to try different search parameters."

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This happened intermittently. It didn't happen with suboptimal "limit=500".

I have also gotten lie "No changes during the given period match these criteria." What can you do to make it faster or increase the timeout? What is the current timeout?

This happened intermittently. It didn't happen with suboptimal "limit=500".

Now, it has happened with "limit=500" and "limit=400", trying even less optimal "limit=300". "238,973 pages are on your Watchlist (plus talk pages)."

I had to back off to 400 again today.

I had to back off to 500, 400, 300, 250, and then 200 today.

It would be good to know something about the query plan and also about your watchlist. I noticed the URL includes namespace=6. What portion of your watchlist are files?

"This search has timed out. You may wish to try different search parameters."

I wonder if this is really Wikimedia-Slow-DB-Query or if the subsequent rendering takes too much time, or both (you can tell using WikimediaDebug). Some work done and to be done is tracked in T341319 (watchlist and recent changes are basically the same).

Since several days I also experience this error message very frequently with approximately 20% of all watchlist page reloads and sometimes up to 50% affected. But the error never appeared twice in a row.

Here is my configuration:

grafik.png (626×1 px, 77 KB)

Update: Now this also appears multiple times in a row and is highly affecting my work.

Here is one of my configurations:

Watchlist timeout error screenshot for T363622.jpg (677×1 px, 162 KB)

We kill any watchlist or recentchange query that takes more than 30 seconds. That's quite normal to call it with filters that could be so expensive that gets killed. So that is normal.

The not-normal or the regression part is that some useful/default/general queries have gotten so slow that now pass that threshold and gets killed.

The part that complicates things is that I'm not seeing any bump in watchlist queries killed but given the prevalence of reports on English Wikipedia, an actual issue is happening but where, I'm not sure.

I can't reproduce the issue myself (my watchlist is quite small), I will see what I can find from the logs.

I had to back off to 100 today, and then I tried to edit my watchlist using https://commons.wikimedia.org/wiki/Special:EditWatchlist and got the following, so it looks like we need "Set $wgShowExceptionDetails = true;" on Commons:
MediaWiki internal error.
Original exception: [f497cc8d-d5a6-4ad1-95eb-db2be5de539e] 2024-06-13 13:19:30: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
Exception caught inside exception handler.
Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.

$wgShowExceptionDetails will just shows the user details of the error. We do have that information in logstash, we just don't show it as it might leak private information. Now that I have the req id, I can look it up in logstash.

With that req id, there is this: https://logstash.wikimedia.org/app/discover#/doc/logstash-*/logstash-mediawiki-1-7.0.0-1-2024.06.13?id=2b_AEZAB_bxzc-Pm1mZU

error
	Got a packet bigger than 'max_allowed_packet' bytes

The query that is triggering more than 32MB of data transfer is this:

SELECT  page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_latest,page_touched,page_len,page_content_model,page_lang  FROM `page`    WHERE ((page_namespace = 0 AND page_title IN ('\"Le_Chasseur_de_crocodile\"_by_Charles-Arthur_Bourgeois','060DA','2015년_5월_서울특별시_중구_서울소방재난본부_현장대응단','ADVERT','ASCII','Actor_Aslam_Sonu_wikipedia_in_hindi','Adamstony3333','AgustaWestland_AW139','All_your_files','All_your_images','Alvaro_Pirez_d\'Evora._A_Portuguese_Painter_in_Italy_on_the_Eve_of_the_Renaissance','Andrew_Paul','Anogcodes_ustulata','Anton_Molander','Apollo_17','Araucanians','Archivo1','Arion_alpinus','Aromatic_molecules','Arthur_Rackham','Ascochyta_viciae','Autonomus_Republics_of_Caucasia','Bauhütte_zum_weißen_blatt','Bellis_perennis','Bill_Gates','Bisco_Smith','Blocking_policy','Boeing_747','Bramble','Briana_Banks','Brock_Dickie','Budapest','Buenos_Aires','CAT:UWT','CAT:WEL','CAT:WELC','CON:ABD','CON:ABN','CT:QFI','Calophyllum_brasiliense','Caricatures_of_Saint_Teresa_of_Ávila','Carillon','Carl_Barks','Carlos_Botelho','Carlos_Botelho_(1964_-_)','Carlos_Botelho_(1964–2014)','Categories','Catmore','Cavia_porcellus','Caxtillān','Central_Park','Chelus_fimbriata','Chelus_fimbriatus','Christian_Slater','Church_of_Santa_Eufemia_de_Cozuelos,_Olmos_de_Ojeda','Ciudad_Autónoma_de_Buenos_Aires','Commons.founation','CommonsHelper','Commons_Helper','Commons_helper','Copulation_in_humans','Copyfraud','Cornelia_Supera','Creative_Commons_icons','Cultural_flags','DFX','DFX/de','DM','DW','DW/es','DW/fr','Dead_end_street','Deletion_requests/Files_in_Category:Saša_Milivojev','DerivativeFX','Dog','Dorcel_HD','Dv','Dw','Dw/es','East_River','España','Eu_vi_seu_pênis,_e_está_em_rede_Internacional!!!','Extatosoma_tiaratum','FC_Bayern_München_kits','FC_Bayern_München_kits_(1900–2000)','Featured_pictures_candidate/Image:Stonehenge_back_wide.jpg','Filaret_Kolessa_phonograph_cylinder_collection/lang','File','Files','Files_by_Arthur_Rackham','Files_by_User:BugWarp','Files_by_User:Jeff_G.','Flexi_disc','Flinfo','Frank_Sinatra','Frida_Kahlo','Fucking','GE_Building','Gani_Gashi','Gentry','George_Bernard_Shaw','George_Washington','Giorgio_Sinigaglia','Golden_ratio','Got_talent_championships','Graça_Morais','HAGGAR????????????????????????????????????????????????????????????????','Hacker_Kaoshusha','Hadriania_truncatula','Hafar_Al-Batin','Hafr_Al-Batin','Hippopotamus_amphibius','Home_classes','Horace_Vernet','Houston','How_Hormones_Affecting_The_DNA_Deoxyribonucleic_Acid','Independent_Nations_Sporting_Club','Info:Thomas_Alva_Edison','Insignia_of_the_Wehrmacht','Inter_Milan','Interwiki:Carlo_Bon_Compagni_di_Mombello','Iron_bridges','Istambul','Jacopo_Tintoretto','Janet_Jackson','Jeff_G','Jeff_G.','Jheronimus_Bosch','Jishigami','Johnson_Space_Center','Josh_Wood','Kelly_Madison','Laura_Pausini','List_of_sovereign_states_in_1960','List_of_sovereign_states_in_1961','List_of_sovereign_states_in_1962','Louisa_May_Alcott','Luis_Buñuel','Lutz_Fehling','Lyndon_B._Johnson_Space_Center','MChew/Archive_1','Madagascar_-_Madagasikara','Madagasikara_/_Madagascar','Main_Page','Mapuche','MeatballWiki','Michelangelo','Morning_Musume','Morus_nigra','NOTHOST','NOTINUSE','New_Jersey','Novi_Sad','OOS','OOS/ar','OOUI_icons','OTRS','OTRS/ar','OTRS/bn','OTRS/cs','OTRS/de','OTRS/es','OTRS/fa','OTRS/fr','OTRS/gl','OTRS/he','OTRS/id','OTRS/it','OTRS/ja','OTRS/nl','OTRS/pl','OTRS/pt','OTRS/tr','OTRS/zh','Oos','Oos/de','Oos/es','Oos/it','Oos/pt-br','Oos/ru','Otrs','PBM???????','PCP','PRP','Pandit_Mukesh_Bhardwaj','Paul_Cézanne','Paweł_Góralczyk','Pcp','Pedro_J._Figueredo_Ravelo','Pelecaniformes','Please','Plik:Tokarev_3-81.png','Prp','Purab_Patel','Página_principal','Queens','RICHARD_BLANCHARD','Rei_d\'Aragó','Robert_Gernhardt','Robinson_Crusoe','Sadegh_Hedayat','Sadeq_Hedayat','Sai_vardhan','Samurai','San_Francisco','San_Francisco,_California','Sarah_Michelle_Gellar','September_13','Serans_(Oise)','Sexpo','Sexual_intercourse_in_humans','Sheet_record','Shuttle_Carrier_Aircraft','Siegfried','Soni_Family_Jaipur_1930.jpg','Sonic','Sovereign-state_flags_in_1960','Sovereign-state_flags_in_1961','Sovereign-state_flags_in_1962','Special_talk:Watchlist','Spider-man_vs_venom','Statue_of_George_Carteret','Stefan_Witczak','São_Paulo','TOO/es','TOO/fr','TOO/id','TOO/it','TOO/pl','TOO/pt-br','TOO/ru','TOO/uk','Taito,_Tokyo','Talisman_Centre','Tanger','Tegel','Test2:Main_Page','Test:Main_Page','Thomas_Alva_Edison','Tiankov_Folk','Tone_Damli_Aaberge','Toni_gale','True_Romance','Tyler_Faith','U.S._Route_shields','UA','U_NIGGER_ASSHOLE_U_NEVER_ANSWER_MY_COMMENT;S_YOU_NIGGER_WORST_CUNT!!!!!!!!!!!!!!!!!!!!!!!!!!!!','User_kcharitakis','Usu:Daniii','V2C','VRT','VRT/CONSENT','VRT/ar','VRT/cs','VRT/de','VRT/es','VRT/fa','VRT/fr','VRT/he','VRT/id','VRT/it','VRT/ko','VRT/nl','VRT/pl','VRT/pt','VRT/ru','VRT/tr','VRT/uk','VRT/uz','VRT/zh','VRTS','Venizia','Vespertunes_Photography','Vladimir_Rebikov','Volunteer_Response_Team','WAREZ_SITEZ','WP:AWB/T','WP:AutoEd','WP:OTRS','Water_cooler','Wawizaght','Weighing_scale','Woman','Yang_Fudong','Yorkshire_terrier','Zosterops_aldabrensis','Κυρία_Δέλτος','Вавававававав ....

Form MediaWiki\Cache\LinkBatch::doQuery

LinkBatch should split queries into batches of fifty or 100 pages. Not all in one go.

Yes, I have lots of crap on my Commons watchlist, built up over 17+ years. Based on a suggestion at https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump#Low_server_performance? after Special:EditWatchlist failed (see above), I tried to use https://commons.wikimedia.org/wiki/Special:EditWatchlist/raw and got "Not enough memory to open this page". :( How much memory should I need to edit my watchlist with 239k pages? Can someone rid my watchlist of all pages which start "File:" for me?

Sure. I can do that and done it before. We avoid changes like this on Fridays. I will it first thing on Monday.

Shortening the watchlist is a bad workaround for the problem. I get this error with 217000 pages on my watchlist. More than the half are my own files and categories I manage in a project and I therefore want to see what happens to them. And there are many thousand files on my watchlist which were vandalized in the past and are likely to be vandalized in the future again. I get multiple hits on these files every day.

We are improving the performance in several areas, one patch has got merged but not deployed yet and the second is being reviewed and hopefully merged and deployed soon.

I already removed the files, with now 22k pages on my watchlist. Since then, I have only had to back off to 700.

I currently get timeouts on my Commons watchlist for over 50% of the list reloads.

I currently have to reload my watchlist for multiple minutes to get the list and not a timeout. I am basically not able to do my task on Commons because of this.

I currently have to reload my watchlist for multiple minutes to get the list and not a timeout. I am basically not able to do my task on Commons because of this.

The usual problem is that the watchlist is too large. Is it possible to take a look and remove some? W are planning to make some changes that could potentially make it better but it'll take time.

Is it possible to take a look and remove some?

More than half of the pages are my uploads where I need to ensure that the pages remain correct. Then there are many pages they are frequently vandalized or pages I edited in a batch maintenance task. But there is no metric to filter between these cases to find the pages I can safely remove from my watchlist.

Is it possible to take a look and remove some?

More than half of the pages are my uploads where I need to ensure that the pages remain correct. Then there are many pages they are frequently vandalized or pages I edited in a batch maintenance task. But there is no metric to filter between these cases to find the pages I can safely remove from my watchlist.

@Cparle is working on some improvements to navigate list of watched pages. There is a WIP patch already. Hope to get it out soon.