Batch creation of contacts via API is slow

Your software
My Mautic version is: 5.1.0
My PHP version is: 8.1.29
My Database type and version is: mysql 8.0

Your problem
My problem is:

Now after switching to Mautic 5 (clean install) I have to do a full contacts sync. I’ve about 7 million contacts to sync.

Mautic 4 handled this full sync in a reasonable time. But now with Mautic 5, the speed is about 1 new contact created per second. I’m using POST contacts/batch/new endpoint. Different batch sizes (1-200) doesn’t seem to affect the overall speed.

So far I have already given Mautic a beefy database with 64GB of ram. Also mautic itself has 60GB of ram. This setup is running in Azure.

Has anybody else seen this regression? Any tricks to optimize or debug the situation? What I can see from the monitoring is that neither the database nor the mautic web container are CPU saturated. I’m puzzled what the bottleneck can be.

There are some discussions happening on Slack about this, possibly because there’s an index missing on the leads.email: Slack

Thanks! Looks indeed the same issue. I’ll create that index by hand and report back to Slack what happened

1 Like