Page MenuHomePhabricator

Rdbms error on Special:Tags on Wikidata
Closed, DuplicatePublic


On Wikidata the page Special:Tags gives a Rdbms error
[WkuiIQpAAD8AAI1uvZ4AAACV] 2018-01-02 15:16:45: Fatale fout van type "Wikimedia\Rdbms\DBQueryTimeoutError"

Related Objects

Event Timeline

Mbch331 created this task.Jan 2 2018, 3:26 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 2 2018, 3:26 PM

Just checked nlwiki and there the page works, so it seems to be related to Wikidata only.

jcrespo added a subscriber: jcrespo.Jan 2 2018, 3:33 PM

This seem to be:

ChangeTags::tagUsageStatistics	2062	Read timeout is reached (	SELECT  ct_tag,count(*) AS `hitcount`  FROM `change_tag`     GROUP BY ct_tag ORDER BY hitcount DESC

That query is taking over 60 seconds, which is a limit imposed otherwise, it could bring down the whole database. This is the MediaWiki-Change-tagging extension most probably.

We #DBAs will go into a "mere observer"/advice mode, as count(*) with no WHERE and with GROUP BY seems likely to be a very costly query:

db1051[wikidatawiki]> EXPLAIN SELECT  ct_tag,count(*) AS `hitcount`  FROM `change_tag`     GROUP BY ct_tag ORDER BY hitcount DESC\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: change_tag
         type: index
possible_keys: NULL
          key: change_tag_tag_id
      key_len: 272
          ref: NULL
         rows: 163464522
        Extra: Using index; Using temporary; Using filesort
  • maybe only run it as a maintenance script?

enwiki is also slow, but just a few seconds. No query should trivially take more than 1 second to respond- or it should be precached.

This is a known issue, The collab team is working on it (and I'm helping in review and stuff). See T91535

jcrespo added a comment.EditedJan 2 2018, 4:04 PM

I am not sure that is the exact same issue- that is about mediawiki performance issues. This is about a partial outage on WikidataWiki, and AFAICS the data I added as a profile hasn't been ported/referenced there. Also, that is a 4-year-old ticket with not much activity.

This is caused by two factors: 1- Mediawiki being slow in handling tags 2- Wikidata is being too big, I don't think we can fix the second part so I see no other option than solving the problem in mediawiki itself.