Page MenuHomePhabricator

u3532 is executing several concurrent, highly-intensive, innefficient long-running queries on at least labsdb1003, potentially hurting the stability of the system
Closed, ResolvedPublic

Description

MariaDB LABS localhost information_schema > SELECT * FROM user_statistics ORDER BY cpu_time DESC LIMIT 20;
+--------------+-------------------+------------------------+----------------+--------------------+--------------------+----------------+--------------+----------------------+--------------+-----------+--------------+---------------+--------------+-----------------+-----------------+----------------+---------------------+-----------------------+--------------------+------------------+---------------+---------------+
| USER         | TOTAL_CONNECTIONS | CONCURRENT_CONNECTIONS | CONNECTED_TIME | BUSY_TIME          | CPU_TIME           | BYTES_RECEIVED | BYTES_SENT   | BINLOG_BYTES_WRITTEN | ROWS_READ    | ROWS_SENT | ROWS_DELETED | ROWS_INSERTED | ROWS_UPDATED | SELECT_COMMANDS | UPDATE_COMMANDS | OTHER_COMMANDS | COMMIT_TRANSACTIONS | ROLLBACK_TRANSACTIONS | DENIED_CONNECTIONS | LOST_CONNECTIONS | ACCESS_DENIED | EMPTY_QUERIES |
+--------------+-------------------+------------------------+----------------+--------------------+--------------------+----------------+--------------+----------------------+--------------+-----------+--------------+---------------+--------------+-----------------+-----------------+----------------+---------------------+-----------------------+--------------------+------------------+---------------+---------------+
| u3532        |               212 |                      0 |         602898 |  588808.4172352143 | 467185.66813364206 |     2286983529 |   3139324642 |                    0 |  17520465410 |  95068206 |            0 |    3015137005 |            0 |             294 |        16949521 |            480 |                 236 |                   119 |                  0 |                0 |             0 |           107 |
MariaDB LABS localhost information_schema > SHOW PROCESSLIST;
+---------+-----------------+--------------------+--------------------+---------+--------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------+----------+
| Id      | User            | Host               | db                 | Command | Time   | State                                                                       | Info                                                                                                 | Progress |
+---------+-----------------+--------------------+--------------------+---------+--------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------+----------+
...
| 3293279 | u3532           | 10.68.18.20:37470  | arwiki_p           | Query   |   1744 | Queried about 28650000 rows                                                 | SELECT r.page_title, count(p.pl_title) FROM pagelinks p INNER JOIN page r ON p.pl_from = r.page_id W |    0.000 |
| 3293415 | u3532           | 10.68.17.252:42486 | dewiki_p           | Query   |   1566 | Queried about 21300000 rows                                                 | SELECT r.page_title, count(p.pl_title) FROM pagelinks p INNER JOIN page r ON p.pl_from = r.page_id W |    0.000 |
| 3293492 | u3532           | 10.68.18.19:35037  | frwiki_p           | Query   |   1645 | Queried about 21410000 rows                                                 | SELECT pl_title,count(pl_from) FROM pagelinks WHERE pl_from IN (SELECT page_id FROM u3532__.frwiki_p |    0.000 |
| 3293498 | u3532           | 10.68.18.40:39238  | huwiki_p           | Query   |   1716 | Queried about 27660000 rows                                                 | SELECT r.page_title, count(p.pl_title) FROM pagelinks p INNER JOIN page r ON p.pl_from = r.page_id W |    0.000 |
| 3293551 | u3532           | 10.68.17.88:41836  | jawiki_p           | Query   |   1663 | Queried about 22190000 rows                                                 | SELECT pl_title,count(pl_from) FROM pagelinks WHERE pl_from IN (SELECT page_id FROM u3532__.jawiki_p |    0.000 |
| 3293589 | u3532           | 10.68.16.57:44472  | ruwiki_p           | Query   |   1641 | Queried about 23240000 rows                                                 | SELECT pl_title,count(pl_from) FROM pagelinks WHERE pl_from IN (SELECT page_id FROM u3532__.ruwiki_p |    0.000 |
| 3293608 | u3532           | 10.68.17.64:40938  | srwiki_p           | Query   |   1685 | Queried about 22440000 rows                                                 | SELECT r.page_title, count(p.pl_title) FROM pagelinks p INNER JOIN page r ON p.pl_from = r.page_id W |    0.000 |
| 3294283 | u3532           | 10.68.17.254:49816 | ukwiki_p           | Query   |   1664 | Queried about 27720000 rows                                                 | SELECT pl_title,count(pl_from) FROM pagelinks WHERE pl_from IN (SELECT page_id FROM u3532__.ukwiki_p |    0.000 |
| 3294477 | u3532           | 10.68.17.49:42784  | viwiki_p           | Query   |   1615 | Queried about 20610000 rows                                                 | SELECT r.page_title, count(p.pl_title) FROM pagelinks p INNER JOIN page r ON p.pl_from = r.page_id W |    0.000 |

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald Transcript
jcrespo renamed this task from u3532 is exeuting highly-intensive, innefficient long-running queries on at least labsdb1003, potentially hurting the stability of the system to u3532 is executing several concurrent, highly-intensive, innefficient long-running queries on at least labsdb1003, potentially hurting the stability of the system.Aug 9 2016, 3:34 PM

I just fixed the problem and now I'm going to code a workround not to saturate the server. thanks.

jcrespo claimed this task.

I've talked to the user on IRC and he seemed very cooperative and understood the issue.