After handling an incident: T147747 I saw a large amount of jobs complaining on the mediawiki logs:
`DatabaseMysqlBase::lock failed to acquire lock 'CategoryMembershipUpdates:1354575'`
https://logstash.wikimedia.org/goto/158cebca05fd93303c3d15d46a1cb0ad (over 400 of those per minute, 99.8% of those on wikidatawiki).
Before that started happening, I saw several long running queries, probably due only to the initial incident:
SELECT /* CategoryMembershipChangeJob::run */ rev_id, rev_page, rev_text_id, rev_timestamp, rev_comment, rev_user_text, rev_user, rev_minor_edit, rev_deleted, rev_len, rev_parent_id, rev_sha1, rev_content_format, rev_content_model FROM `revision` WHERE rev_page = '7165976' AND (rev_timestamp > '20161009084342' OR (rev_timestamp = '20161009084342' AND rev_id > 0)) ORDER BY rev_timestamp ASC, rev_id ASC
Could this be related to the changes on T133801 ?
This has been happening at higher rates since 2016-10-07. It happens, I believe in other wikis that are not wikidatawiki but the rate is 1:100 with all other wikis, including dewiki, which shares resources with.