Very slow import on a 64 core / 128gb server

Your software
My Mautic version is: 4.4.9
My PHP version is: 8.0.30
My Database type and version is: 8.0.34 / mysqli

Your problem
My problem is:

Running only a mautic installation on this server. Importing contacts is extremely slow. Just 500 contacts, 4 columns of data per contact.

Server is 64 core, 128GB, SSD. Very standard setup, and the marketing team needs this to work from the browser, they do not understand command line. Since this is the only thing running on the server though, it should be fine.

Importing 500 contacts takes over 25 minutes. And sometimes just times out.

These errors are showing in the log:

No errors in the log or on the server

Steps I have tried to fix the problem:

Set Mautic account on the server to have unrestricted use of CPU, Memory, IO, MySQL and all other things I could think about.

Changed PHP version to 7.4 and 8.0

Changed web server from Apache to Litespeed and back

Can’t think of anything else at this point…

Thank you in advance for the help!

I urge you to check previous comments, cause this is a pretty popular question.

If your resources are fine, then:

  • check db index
  • limit fields you import at once
  • optimize cron

Hey Joey,

Appreciate the reply. The info you gave in the other post is what I already tried before posting. This is a beefy dedicated server, so it should handle a PHP app like Mautic really easily.

Database indexing, even on that specific table is set.

There’s only 4 fields per entry

Not using the cron at all. 1000 entries, 4 fields each. If I were to run this as a MySQL data point, this machine could complete this in a few seconds.

The delay is happening within Mautic, it seems to be processing things really slowly.

This is a 64 core, 128GB ram machine with absolutely nothing else running on it.

I’m at a complete loss as to what to try. I’ve exhausted the troubleshooting about things I know about, so is there some sort of process log or strace ability in Mautic to see where the delay in processing is happening and why?

Can you plz setup an import, choose background processing.
Then go to command line and execute the
mautic:import command.

Here is some help:

What do you see - are the contacts added really slow? Like 1-2 / sec?

Here is a tip how to speed up the import speed: