View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017601 | mantisbt | bugtracker | public | 2014-08-18 08:34 | 2017-01-09 16:43 |
Reporter | taken | Assigned To | atrol | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Linux | OS | Debian | OS Version | 7.6 |
Product Version | 1.2.4 | ||||
Summary | 0017601: MantisBT start working amazing slow after 3 years | ||||
Description | Hello | ||||
Additional Information | MantisBT Database Statistics mantis_bug_file_table = 154047 records Here is slowqueries when i try login to Administrator: Time: 140818 14:28:40User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 31.036525 Lock_time: 0.000158 Rows_sent: 10 Rows_examined: 1362617SET timestamp=1408364920; and some other slow queries: Time: 140818 14:10:57User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 27.992177 Lock_time: 0.000269 Rows_sent: 1 Rows_examined: 2138989SET timestamp=1408363857; Time: 140818 14:11:24User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 27.710548 Lock_time: 0.004076 Rows_sent: 10 Rows_examined: 2138675SET timestamp=1408363884; Thanks | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
This is most likely the root cause of the problem - this table should be empty. The fact that you have data in there, means that emails are not getting sent, and the performance degradation is caused by Mantis trying (and apparently failing) to send queued emails. As a quick workaround, you can purge the e-mail queue (in the admin pages, there's a function for that). Alternatively, you should setup your system to send e-mails asynchronously ($g_email_send_using_cronjob = ON, use scripts/send_emails.php to actually send them). To fix the root cause, you need to find out why e-mails are not being sent. Check your system logs, and try also to set $g_log_level = LOG_EMAIL |
|
Hello MantisBT Database Statistics mantis_bug_file_table = 154067 records Marek |
|
Hello MantisBT Database Statistics mantis_bug_file_table = 154129 records |
|
You report that you're on version 1.2.4, which is quite outdated. Can you please upgrade to the latest version 1.2.17 and try again ? That said, looking at your slow queries, it may be that a query is performing badly. I don't have a DB of comparable size available for testing so troubleshooting will be difficult. It looks like (last 2 slow queries) you are executing a text search ('plva' and 'plvb') - is this a saved filter ? Can you try to reset/clear the filter ? Is it only slow for administrator, or for all users ? |
|
Hello, This is a little more slow queries: Time: 140819 11:36:37User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 10.979906 Lock_time: 0.000205 Rows_sent: 10 Rows_examined: 1058801SET timestamp=1408440997; Time: 140819 11:36:43User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 5.295903 Lock_time: 0.000113 Rows_sent: 1549 Rows_examined: 259731SET timestamp=1408441003; User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 5.293749 Lock_time: 0.000135 Rows_sent: 1549 Rows_examined: 259731SET timestamp=1408441003; Time: 140819 11:36:44User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 5.561588 Lock_time: 0.000120 Rows_sent: 1549 Rows_examined: 259731SET timestamp=1408441004; Time: 140819 11:36:49User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 5.334093 Lock_time: 0.000090 Rows_sent: 7409 Rows_examined: 146926SET timestamp=1408441009; Time: 140819 11:36:50User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 6.449360 Lock_time: 0.000083 Rows_sent: 7409 Rows_examined: 146926SET timestamp=1408441010; Time: 140819 11:36:56User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 7.212283 Lock_time: 0.000090 Rows_sent: 7409 Rows_examined: 146926SET timestamp=1408441016; User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 7.575557 Lock_time: 0.000151 Rows_sent: 1532 Rows_examined: 199481SET timestamp=1408441016; Time: 140819 11:36:57User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 6.646779 Lock_time: 0.000103 Rows_sent: 1532 Rows_examined: 199481SET timestamp=1408441017; User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 14.387190 Lock_time: 0.000511 Rows_sent: 10 Rows_examined: 185101SET timestamp=1408441017; User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 8.349124 Lock_time: 0.000134 Rows_sent: 10 Rows_examined: 149890SET timestamp=1408441017; Thanks |
|
I mean, in View issues page select [Reset filter] from the selection list, then click 'Use Filter' button. Also you have lots of projects, does the slowdown occur when you're on 'All Projects' or also when you have an individual project selected ? If it's a general slow down, it may be necessary to tune your mysql DB. Unfortunately not something I can help you with. If there are individual queries that are systematically running slow, then they should be analyzed. |
|
Had a VERY short look at it and didn't find the code where we use |
|
I use verry old version 1.2.4 mayby that`s why? |
|
You are right, this has been changed in 1.2.12, see 0014766 Of course, as said by dregad, you should upgrade. |
|
I w8 for approve to do upgrade ASAP, but like i say this is hard for now because this is production.... :( |
|
There is no database schema change since 1.2.4 |
|
So if i replace files from 1.2.4 to 1.2.17 everything will be work with np? |
|
I can't gurantee anything, but I don't expect any issues if you didn't change any code of MantisBT, didn't install any 3rd party plugin and didn't add any custom functions. I recommend to upload 1.2.17 parallel to your existing 1.2.4, copy config_inc.php from 1.2.4 to 1.2.17, do some tests with 1.2.17. |
|
I run 1.2.17 in another directory and when i logging to Administrator i wait 30+ sec this is a log: Time: 140819 14:53:10User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 33.916609 Lock_time: 1.867455 Rows_sent: 10 Rows_examined: 1080905SET timestamp=1408452790; When i click my view: Time: 140819 14:55:02User@Host: root[root] @ mantis.local [172.30.30.30]Query_time: 18.923060 Lock_time: 0.000202 Rows_sent: 10 Rows_examined: 821464SET timestamp=1408452902; Thanks |
|
Add the following lines to config_inc.php
Click "My View" Paste all content at the bottom of the page starting from Furthermore you can try to add an index on table mantis_bug_table column view_state |
|
Hello This is log. |
|
Run the following SQL-Statement in phpMyAdmin or any other MySQL you use and attach the output to the issue.
Which version of MySQL do you use? |
|
mysql> EXPLAIN SELECT COUNT( DISTINCT mantis_bug_table.id ) AS idcnt mysql> EXPLAIN SELECT DISTINCT mantis_bug_table.* Server version: 5.5.38-0+wheezy1-log (Debian) Thanks |
|
I am not a MySQL performance specialist. I have no knowledge about how the query optimizer works in MySQL. I tried on a test system, but was not able to reproduce the behaviour, I get Sorry, I can't invest more time in that. I recommend to contact a MySQL specialist. |
|
You could deactivate the "Recently modified" box (and maybe even some more) on "My View" page as a temporary workaround.
|
|
Hello Marek |
|
The number of displayed users didn't change from 1.2.4 to 1.2.17. Marek, Can we close this one? |
|
Please close for now this bug i reopen if we saw problem with 1.2.17. Thanks |
|