New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alerts killing performance - Improve/Reduce Retrieval of Alerts #5313
Comments
Please fill in the version details asked in the Issue template! There was an old issue with this, but it was fixed long ago. Since I don't know your version of SuiteCRM, it's hard to tell if it's the same thing... I do agree a flag to disable alerts is a good idea, though. But we should start by making sure they don't degrade performance anyway. |
Updated Issue. SuiteCRM 7.8.15 |
Can you run this SQL SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 20; To see if you have overgrown tables, especially |
As requested. I run multiple instances s I have selected to one of interest. I have noticed email_addr_bean_rel seems to have a huge number of rows.
|
I have run this query and getting 53,000 (orphaned?) rows. Is it safe to delete them?
|
I deleted them. No effect. Contact detailView 5.62s vs 1.5s. |
I had more hopes for that What do you get when you do select count(*) from job_queue where status = 'done'; |
count=43,373 |
Maybe try deleting all of those, leaving only the ones in the latest month, for example, just in case. (make sure you have backups of it all, of course) |
I deleted them to no avail. However, I deleted 78 reminders (which we don't use because we never saw them) and performance has returned to normal. The function Reminders::addNotifications was taking all the time. Any idea how to disable reminders? There is also a little more to do to stop Alerts completely. There is a periodic query every 60 seconds by javascript loaded independently of the above code in sugar_grp1.js (from jssource/src_files/include/javascript/alerts.js). I have updated the code above to use the config to disable this periodic query by setting a javascript flag. |
Hi @nelem We'll look at this area (improving the retrieval of alerts) for the coming releases. Thanks for raising the issue. |
Resolved here: #5370 |
Issue
Alerts are killing performance in one particular instance. Queries are taking 8 seconds for a fairly complex Home dashboard vs 4.3 seconds without Alerts. Contact DetailView 5.7s vs 1.39s.
A whole four seconds for the Alerts - which I don't use (yet?).
Alerts are also really annoying while debugging and there have been many requests to disable them. I have used a config variable to disable alerts which must be set TRUE to actually disable them. Alerts are already disabled for mobile devices.
Possible Fix
in include/MVC/View/SugarView.php line 177
and in include/SubPanel/SubPanelViewer.php line 100
plus the periodic Alerts query in jssource/src_files/include/javascript/alerts.js line 210
To actually disable Alerts
$sugar_config['disable_alerts'] = true;
Context
My context may be unusual because I have 9 custom relate fields relating to further contacts (with 9 relate fields). I haven't traced the queries because there are thousands of them - all on Contacts.
Your Environment
The text was updated successfully, but these errors were encountered: