Performance issue in admin and tracking code

Hi, I have a severe performance issue using Mautic. The tracking code takes up to 10 seconds to load, and everu page in the admin takes a lopt of time to refresh. The website is running fine, both are located on a dedicated server, under the same domain.



I have 2,600 contacts and a low volume of web traffic.



What can I look or try?



Regards,

Xavier

Hi, I have a severe performance issue using Mautic. The tracking code takes up to 10 seconds to load, and everu page in the admin takes a lopt of time to refresh. The website is running fine, both are located on a dedicated server, under the same domain.

I have 2,600 contacts and a low volume of web traffic.

What can I look or try?

Regards,
Xavier

Hi, I have found a solution in this older thread: https://www.mautic.org/community/index.php/113-incredibly-slow-response-times/p1#p23894, from wittwerch. It has reduced the load time of the tracking script from 4-8 seconds to approx. 1 second.

===

Beside that Mautic has that weird concept of sleep times built in: https://github.com/mautic/mautic/blob/556f4e4969ad9124106dcb9535a5704d863665fc/app/bundles/CampaignBundle/Model/EventModel.php#L618
That will basically introduce artificial wait time into your process, so I would recommend to set that to zero so you make use of all the CPU power you have.

app/config/parameters_local.php

<?php $parameters = array( 'batch_sleep_time' => 0, );

Hi,

Sorry it is not fixed, I looked at the wrong script. It is still taking up to 10 secondfs to load.

Any hints?

Xavier

So the mtc.js call takes like 10 seconds? What do webserver logs say? And the db server logs?

Hi,

I have cleaned the Mautic cache and updated the database schema, as the doc says. Then looked at the server logs:

Apache error log is clean
PHP error log is clean
MySQL log is clean
Mautic log is also clean

There are no traces of any errors in the logs, all records look good. The server has low traffic, there are no CPU issues, and it is a dedicated server with loads of memory, CPU and disk space.

But mtc.js tajes 5 to 10 secs to load (more often 10).

What else can I look at?

Xavier

Argh, I don’t think I can be of help. Seems like you’ve checked everything I would.

Have you experimented with turning off individual Apache and/or PHP modules just in case some of these are causing you issues? I don’t know, possibly gzip or something similar.

Sorry I can’t be of greater help.
D

PS: mtc.js is generated dynamically (using PHP) so maybe if you turned on some verbose PHP logging, you could find something out…?

Hi,

PHP logging does not add anything new. I will try removing individuañ modules, but I cannog think of anyone that can cause a delay instead of an error.

Besides, I have looked at a customer’s site, where I installed Mautic and is a very similar server, actyually a bit less powerful. There, mtc.js loads in under 2 seconds - as it should be.

Both servers are very similar, they come from the same provider, and there is no difference in the installation (same version).

Is there any way to see what is happening inside Mautic, to trace or time or see queries?

Xavier

Hi,

I found the issue. It was the MySQL server, I have disabled the DNS lookup and times are correct now, they have reduced to one fifth the original time. It affected all sites, though Mautic was much more severely affected, don’t know why.

Thanks for your help.

Regards,
Xavier