Dasboard load takin too long (huge base of contacts)

Infos
My Mautic version is: 2.16.3
My PHP version is: 7.2.24

My problem
The Mautic dashboard takes too many time to load (10/20 minutes). I have a base with around 2 million leads, so I think this may be related. Please note that this is not preventing me from access the Mautic.

No errors are being shown in the logs.

Steps I have tried to fix the problem: Instal the dashboard warm plugin (https://github.com/TheDMSGroup/mautic-dashboard-warm), but it didn’t worked at all for me.

There’s a feature for loading contacts in Batches in the background.

After you upload the file choose background upload. You need to setup a Cron job to run the import background task.

php /path/to/mautic/app/console mautic:import

You’ll have to tweak the timing of your cron jobs.

I think what @peter_br meant, that his dashboard is loading too slow. not that cronjobs are processing the leads and actions slow.
I think it’s def connected with the number of your contacts.
If you really want to experiment around, you can disable the widgets one by one and see which one generates way too high load on your db.
You could also check if there are any tables in your DB, that are overly bloated. Sometimes ‘notification’ can go wild or email stats.
Good luck!

1 Like

@joeyk I think you may be right. @peter_br May be worthwhile optimizing your DB tables and checking them for errors since you have so many lead records.

In my experience (but I don’t have 2 million lead records yet :wink: ) my Dashboard seems to slow when Cronjobs overlap. It’s why I thought of this first. My instance is slightly smaller than yours would be. But more records = more resources when the jobs run. If your database has issues the problem compounds.

Steps I have tried to fix the problem: Instal the dashboard warm plugin (https://github.com/TheDMSGroup/mautic-dashboard-warm ), but it didn’t worked at all for me.

You can run this from the terminal as well with:
php /path/to/www/app/console cache:clear
php /path/to/www/app/console cache:warm

(replace /path/to/www/ with your webroot depending on your setup and os e.g. /var/www/html/)

Something else you can look for:
I spotted some logs about Composer updating dependencies that ran my PHP out of Ram on 3.1.2 just yesterday. The Dash slowed down to a crawl although it worked. Doubled my PHP Maximum Ram and the slowness disappeared.

Do you have any visibility into the free memory and swap usage on your install?

Can you share:

  • mautic logs
  • apache (or other webserver) error.log
  • Mysql / (or other DB) error logs

Right now we’re just guessing. Logs always give a fuller picture.

I go with @joeyk here. Look at removing widgets from the dashboard. We also run a number of installs where the contacts size are in the millions and were faced with the same issue.

Actually removed everything from the dashboard and that made it more accessible.

Interesting to understand what your server specs are as well.

@joeyk also gave me a good tip at optimising cronjob on huge segments

1 Like

Hey @alexhammer - I see you just liked this post. Did you check out what we did with creating a cool dashboard using metaphase ? post here

1 Like

Hi @mikew :slight_smile: This is awesome. Thank you for pointing me there and for sharing this awesome dashboard solution :partying_face:

1 Like