Performance probelms

Hello all,

We have a project of 3 stages, one installation/server by stage.

In development eand Test servers we have no problems of performance (regarding the HTTP 500 reported in another topic). Although in production environment the system very slow. Sometimes it takes almost 1 min to show the accounts list.

Our stack is:
[table]
[tr]
[td]OS[/td]
[td]Windows Server 2012[/td]
[/tr]
[tr]
[td]DB[/td]
[td]Maria DB 10.1[/td]
[/tr]
[tr]
[td]WEB Server[/td]
[td]IIS 8.5[/td]
[/tr]
[tr]
[td]PHP[/td]
[td]7.1.7[/td]
[/tr]
[tr]
[td]SuiteCRM[/td]
[td]7.9.8[/td]
[/tr]
[/table]

There were a couple of performance bugs that were fixed after your version, they were related to “reminders” table, you can find the fixes on GitHub.

Anyway I would start by running the query at the beginning of this post

https://pgorod.github.io/Database-tables-size/

this should help you get a vision of any overgrown tables, they are usually the cause for the long delays in production systems.

This is kind of strange because the 3 environments have the same stack. and only get this low performance in production.

the only difference is that in production we have more users and the database is in a different server.

From your suggested query I do not get any issues.

I guess it’s normal for performance issues that come from the amount of data to appear in production :slight_smile: although if this is what I’m thinking, it’s a very disproportionate delay (too long delay, even if you don’t have that much data)

Have a look at this to see if it’s the same thing

https://github.com/salesagility/SuiteCRM/pull/5338

Do you have any List View hooks running on Accounts or have set the Log to error or debug mode?

i would recommend follow these steps which still applies to Suite CRM .

Hello all,

After digging in this issue, we may conclude the problem should stay in the database performance, once the execution time takes about 75% or more of the time.

Does anyone know how to improve the db performance or detect why is this taking so much time?

I posted a few pointers above - the query for table and index sizes is usually the place to start. That post on my blog also includes a bunch of other tips.

Then there is the GitHub issue describing the bug with reminders - this manifests itself as very slow queries.

Finally, you can turn on in Admin / System settings and option called “Log slow queries”, and then inspect your logs to see which queries are taking more than X seconds.

Hi pgr,

I have read your post, but unfortunately it does no give me any clue about this issue. the execution times for alerts are good enough (it even does report as slow query).

Our database volume in development and production have exactly the same amount of data, once we needed try test the migration process.

That’s why I said the problem is in the database, after checking the execution time in database.

Ok. When the times are really huge, like you say (one minute), a “manual” technique sometimes brings good results.

First raise your suitecrm log level to Debug.

Open an SSH console (with Putty or similar) into your server. Make sure you tell your terminal to keep a LOT of lines of scrollback (I use 9999 in Putty).

Now run a tail on your suitecrm.log

tail -f suitecrm.log

Now go into the Accounts view that is slow. You will see a lot of lines scrolling past. But at some point you will probably see a noticeable stop of several seconds. Hit enter 5 or 10 times to “mark the spot”. When the operation is finally over, get the entire content from Putty “Copy all to clipboard” and paste it in a Notepad++ or any editor.

Find the place with the blank lines, where the delay happened, and try to figure out what is taking too long. Since this is debug level your SQL Queries should be in the log, so you can then try them directly in MySQL, check indexes, do repairs/optimize to tables, etc.