#31614 – mysql performance problem - queries are not terminated

Posted in ‘Akeeba Admin Tools for Joomla!’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Monday, 05 August 2019 05:57 CDT
Hello,
I have a huge problem with the performance of the mysql database. The research why this is so in the review of the mysql process list brought to light:

Querying the table sjt1i_admintools_scanalerts seems to be responsible for the very high CPU load. Below you will find the process list output. The queries do not appear to stop because there are more and more. All that remains for me is to restart mysql.

What is the reason? How can this be turned off?



+------+----------------+-----------------+----------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+------+----------------+-----------------+----------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
| 17 | ispp_bandaemon | localhost | ispprotect_bandaemon | Sleep | 2 | | | 0.000 |
| 799 | ispconfig | localhost:33272 | dbispconfig | Sleep | 28 | | | 0.000 |
| 800 | ispconfig | localhost:33274 | dbispconfig | Sleep | 269 | | | 0.000 |
| 1432 | ispconfig | localhost | dbispconfig | Sleep | 23 | | | 0.000 |
| 1435 | usr201 | localhost | db204 | Sleep | 12 | | | 0.000 |
| 1465 | usr201 | localhost | db204 | Query | 1 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'build/plugins/system/core/classes/scss/F | 0.000 |
| 1468 | usr201 | localhost | db204 | Query | 1 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'libraries/fof30/include.php'
ORDER BY `s | 0.000 |
| 1505 | usr201 | localhost | db204 | Query | 1 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'build/template/html/com_content/archive/ | 0.000 |
| 1506 | usr201 | localhost | db204 | Query | 0 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'libraries/fof/form/field/email.php'
ORDE | 0.000 |
| 1507 | usr201 | localhost | db204 | Query | 1 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'layouts/libraries/cms/html/bootstrap/end | 0.000 |
| 1510 | usr201 | localhost | db204 | Query | 0 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'build/template/html/layouts/joomla/conte | 0.000 |
| 1511 | usr201 | localhost | db204 | Query | 1 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'layouts/joomla/content/icons/email.php'
| 0.000 |
| 1512 | usr201 | localhost | db204 | Query | 0 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'layouts/joomla/form/field/range.php'
ORD | 0.000 |
| 1513 | usr201 | localhost | db204 | Query | 2 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'libraries/src/Toolbar/Button/SliderButto | 0.000 |
| 1514 | usr201 | localhost | db204 | Query | 1 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'build/template/html/layouts/joomla/conte | 0.000 |
| 1515 | usr201 | localhost | db204 | Query | 1 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'libraries/fof/less/formatter/joomla.php' | 0.000 |
| 1516 | usr201 | localhost | db204 | Query | 0 | Sorting result | SELECT *
FROM `sjt1i_admintools_scanalerts`
WHERE `path` = 'libraries/src/Toolbar/Button/ConfirmButt | 0.000 |
| 1517 | root | localhost | | Query | 0 | init | show processlist | 0.000 |
+------+----------------+-----------------+----------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
Custom Fields
Joomla! version (in x.y.z format) Joomla! 3.9.10
PHP version (in x.y.z format) PHP 7.1.14
Admin Tools version (x.y.z format) Admin Tools version 5.3.3
 
juser
Monday, 05 August 2019 09:05 CDT
Hello,

can you please tell me the size of your table? Are you calculating file diffs during the scan?
We can only help you mitigate the issues, but that's something related to server configuration


Davide Tampellini

Developer and Support Staff



Italian: native

English: good



Please keep in mind my timezone and cultural differences when reading my replies. Thank you!



tampe125
Thursday, 08 August 2019 01:32 CDT
Hello Davide,
thank you for your help.
After a long search and research I found out that the scan of the files by /cli/admintools-filescanner.php is the cause. I switched off the cron job with the file scanner yesterday and had no performance problems or open queries this morning.
 
juser
Thursday, 08 August 2019 03:27 CDT
Those select queries shouldn't take more than a few milliseconds each to complete. However, as Davide mentioned, if you are calculating diffs during the PHP File Change Scanner run and you have substantially big tables you are effectively asking the database to return a lot of data, very often. Clearing all past scans and disabling diff calculation will fix that problem for you. If not, you have a problem with MySQL itself. I don't know what. I have never had such a problem and I've never heard of that problem in the ten years this feature has been around. So I'm pretty sure that the culprit is calculating diffs which is indeed very taxing on the database server and the reason we have that feature disabled by default.


Nicholas K. Dionysopoulos

Lead Developer and Director



Greek: native

English: excellent

French: basic



Please keep in mind my timezone and cultural differences when reading my replies. Thank you!



nicholas
Saturday, 07 September 2019 17:17 CDT
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
system
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!

Cookies Notification - Action required

This website uses cookies to provide user authentication and improve your user experience. Please indicate whether you consent to our site placing these cookies on your device. You can change your preference later, from the controls which will be made available to you at the bottom of every page of our site.