I’ve been using SuiteCRM for around two years now and have done a lot of integrating it with other platforms such as Drupal, and stand alone forms.
There’s been one persistent issue that I haven’t been able to figure out. Currently running version 7.8.0
For some reason, occasionally web services using REST (set_entry,set_relationship, get_entry) fail. I did some debugging and I can see that the request are always sent, and it never has issues creating sessions. What I did notice is that in these instances, the response from the my SuiteCRM site is blank. I’m at a loss on what to look at since it happens occasionally but it’s starting causing a problem the more that I use it and the more its growing. I can’t use pure MYSQLi because a lot of my modules which are being saved to require logic hooks to run. I’ve also to run into some other issues like creating a relationship in studio requires me to do a rebuild relationships after or sometimes when I save a field it returns “undefined”.
Has this happened to anyone else? Is there something I can look at doing? Could it be that my suiteCRM server needs more resources? My web server which only has the suiteCRM install has 8GB of ram, and my database on a separate server has 6GB.
Our leads is actually the amount that we have (and that should be there), and it’s been the most problematic module. Most of our custom modules have a relationship to Leads and the lead information is pulled often with our web services. As for deleted records, we only have 8 where deleted=1.
Still, make sure you clean the other auxiliary tables, it will surely make a difference in your general performance.
Use “log slow queries” to determine your critical tables.
And use this kind of queries to examine orphaned relationship with leads and email_beans:
SELECT * -- DELETE ChildTable
FROM contacts_cstm ChildTable
LEFT JOIN contacts ParentTable
ON ChildTable.id_c = ParentTable.id
WHERE ParentTable.id IS NULL
The first line is a SELECT, which you can then change to a DELETE as shown in the comment (the part after "-- " is a comment). Obviously, be very careful and have backups before you do any DELETEs directly in the database.
You only have to change the table names, in this case “contacts” and “contacts.cstm”, and the fileds in the ON condition, nothing else.
With this you can list records that are not linked to anything, or clean entries from relationship tables that don’t have the corresponding target records anymore (possibly deleted).
Even if I do manage to clean some items, my database will always grow. For auditing purposes we can’t remove a lot of our module data for at least 5-7 years.
Are there any options? Are there service side resources we should look into such as more ram or an SSD drive that will this help or are we still limited by the capabilities of SuiteCRM itself? Are the new APIs in 7.10 more optimized?
Don’t worry, SuiteCRM can handle a lot more than that. But as things start to grow you will have more work as a sysadmin
Ok, where can I start…
yes, using SSDs sounds like a sensible idea (the last spinning disk I bought, except for backup purposes, was in 2011…)
you can scale a bit by splitting database server and web server. Just clone your server, then shut off the web server on one, and shut off the database on the other. Adjust the config.php to connect to the database on the other server. Give them a fast dedicated network connection.
Cleaning up auxiliary tables:
as I said, don’t neglect this. Some of these things involve queries that run every time you’re doing something else in your system.
aod_indexevent: I think (not sure) that this can be all deleted. This can be tested on a clone. Or you could try a re-indexing to see if it creates a much smaller table.
campaign_log: do you need old campaign events stored? Even for Campaigns that have finished? Can you just store some aggregated data elsewhere, like a history of past Campaigns in Excel?
job_queue: perfectly safe to delete jobs where status=‘done’ and date older than one month (for example).
tracker: if you’re not using it, turn it off. It’s a tool to see which screens your users are visiting, and what they’re up to in the system.
normally, a good DBA can make any database faster by analyzing queries and adjusting indexes. This can be a good solution for your largest tables with the most data: make sure your API calls queries are going through appropriate indexes.
Move Auditing data offline:
the old, stale data, that you just need for auditing purposes, can be stored in separate tables, not mixed with the queries that really matter to you during normal operation.
yes, the v8 API should be better and more performant.
remember that your use of the API can probably be optimized. Make sure you’re not getting huge lists, or unnecessarily repeating searches, etc.