Mautic Server resource proper utilization

Your software
My Mautic version is: v4.4.1
My PHP version is: 7.4.23
My Database type and version is: 10.3.37-MariaDB-0ubuntu0.20.04.1

Your problem
My problem is: It seems eventhough we have very powerful server but still mautic site/server get hanged till we reboot. we are using aws server when we see cpu utilizaion graph it showing 5 to 15 % max cpu utilizaion. So My question is

Why mautic site/server is get hanged frequently ?
How to utlize server memory properly so that it will not get hanged any more?
What other suggestion we should follow to avoid such type of hanging issue?

We are having 15 lac contact, lead_event_log having 22 cr +, We update segment cron every 1 hour
We have choosen mail sending option immediately.

Please guide as to overcome from this.

Awaiting for your valuable reply !!!

Hi, how many contacts u have? How many segments? How much email u send pro hour?

Total Contact Count : 9283281
Total Contact Count with Email(can say valid contact) : 1350505
Total Segment Count : 165
Mail Speed : 13 per sec(This is aws mail sending rate)

Mail sending process is not continuous for 24 hours. I mean when we send email, mail volume may vary sometime 50 thousand to 3 lac in 1 batch.

Hi,
Okay, so this would be a size, where you need to do multiple adjustments to be able to run it properly.
Mautic - out of the box - is not built for this size. Mautic feels comfortable in the 10.000 - 100.000 db size.
Above that you need to take compromises and tweak things.
In your case, it will be A LOT F WORK AND LEARNING.

I can’t lay down the whole process here, cause I didn’t tackle all challanges myself, but I can point you in the right direction.

  1. Learn about mysql memory consumption, identify querries that take long. Once you’ve done that, you need to make the changes to your mysql settings to use more memory or have bigger cache / support for larger table siezes.

  2. Change your dashboard to eliminate charts with larger DB intensity.

  3. Read the Mautic PRs and keep an eye on github. There is a lot of good info there:
    For example: Mautic 4.4.6 Dashboard is very slow · Issue #12059 · mautic/mautic · GitHub
    Check if there are improvements in the Mautic 5 branch and carefully apply them as PRs.

  4. Switch to queue based email sending - it helps with the speed. I doubt, that you send 13/sec right now.

  5. Turn off segments which you don’'t need. Don’t process all segments all the time - it takes a lot of DB power.

  6. Install queue protocol if needed

  7. Do regular cleanups to make sure your DB is not blated. Here is an article:
    Tutorial - Housekeeping Plugin for Mautic

4 Likes

I know this is such a big topic and there is so much to write and talk about, I think it would be great if there was some more knowedlge share around Mautic server optimization.

I have read many articles on setting up mautic workers behind a firewall, distributing traffic, creating master-slave and master-master environments, tweaking php for fpm etc… and I am happy to share my findings and help out the community as best I can.

However for the life of me after so many years and not being a dedicated Devops person I still face the issues mentioned above,

Yes each instance is unique but surely we can come up with some guidelines to increase performance on a server level.

There are certain people in the community (that I do not think are here anymore) that were quite tight-lipped about sharing this kind of information, however I am a big believer in open source and transparency.

Would there be any interest in hosting a workshop or a series of workshops in order to share different setups and ideas on optimizing servers for Mautic? @joeyk @rcheesley @ekke ?

1 Like

Hi @mikew I think that sounds great, and even better if it could culminate in writing some resources for https://kb.mautic.org and maybe even the blog at Mautic Community Blog?

That way there will be some resources that can be referred to in the future, which can be translated and updated over time.

If you set something up please do ping in the #t-marketing channel on Slack to get some help with promoting it.

I had a very fruitful chat with @Leon_Oltmanns in Wien and made me realise, that we all try to tackle the same problem with different approach. I think all the knowledge is available, just scattered through the providers / people.
I don’t think someone has ALL the pieces of the puzzle, but together we might be able to put something together.
I suggest we do a series of meetups, where everyone would explain what they managed to solve, and how, and let’s see if we can learn from eachother.

2 Likes

Lets get something scheduled that is comfortable for everyone.

Can we get a list of interested people and I am happy to take the initiative of setting up the first series.

@rcheesley maybe you want to do an announcement here and on slack, once I am provided with the interested parties I will setup a quick survey that people can fill in about where they are and times/days that are comfortable for them and then I will go about scheduling the meetup

1 Like

For sure - if you can share the copy / link then any of the leadership team can announce in the relevant places :slight_smile: