We just had an issue where hung queries from the Web API were causing massive lag on one of the Wikidata servers. Example query snippet:
SELECT /* ApiQueryAllUsers::execute */ ipb_deleted,COUNT(*) AS recentedits,user_name
Lag as reported by https://www.wikidata.org/w/api.php?action=query&meta=siteinfo&siprop=dbrepllag&sishowalldb= was high:
<?xml version="1.0"?>
<api>
<query> <dbrepllag> <db host="db1058" lag="0" /> <db host="db1005" lag="0" /> <db host="db1026" lag="26432" /> <db host="db1021" lag="0" /> </dbrepllag> </query>
</api>
Server log entry about killing the queries: https://wikitech.wikimedia.org/w/index.php?title=Server_Admin_Log&diff=80744&oldid=80742&diffonly=1.
As soon as the queries were killed, lag decreased.
ApiQueryAllUsers needs investigation.
Version: 1.22.0
Severity: normal