Import is very slow

Your software
My Mautic version is: 2.15.3
My PHP version is:7.1.33

Your problem
My problem is: Import Contacts is very slow.
I have upload csv which has 14K plus record and tried with browser import it will take around 1hour and if i choose background import it will take more than 30 minutes.
It is very slow in both case.

These errors are showing in the log: N/A

Steps I have tried to fix the problem:
I have checked in version-2.16.3 but it is also taking 30 minutes.
I have tried https://github.com/mautic/mautic/issues/2630#issuecomment-252820294
but it won’t effect.

Please give me some suggestions to improve speed for import.

Thank you.

The speed of the background import depends on the batch size you import with your cron job.
for example:

mautic:import --limit=500

will import only 500 contacts every time your cron job runs.
If your cronjob runs every 5 min, than it will take you 28 minutes
Try to go in with ssh, and run your cron commands by hand.
Start a stopwatch on your phone and time it how long the 500 emails takes.

If you see, that it’s really slow - you might need to look for a better hosting, or tweak your config.
If you see, that the 500 is done within 1 minute, than you can change your cronjob accordingly.

Please note, that if importing 14.000 contact really takes 30 minutes, you’ll have speed issues when you rebuild your segments.

Good luck to you!
Joey

3 Likes

I just transferred by segments from one install to another hit this issuue. It was solved very well by upping the limit. I ended going with 3000 which was handled very well by Mautic. I’m running on a beefy system but it seemed to not even phase the CPU or memory.

mautic:import --limit=3000

where did you put in this code?
mautic:import --limit=3000

may I ask how beefy your server is?

I have a 4 gb server at cloudways - running on digital ocean and can scale up of course - I am paying $54 a month for the instance of the managed VPS.

I need to import a list of 5.4 million. - 2.1 million emails only as the rest have phone numbers for SMS marketing ect


Hi,
This is the Cronjobs you need to set up for Mautic.
After installing Mautic make sure you have the email column indexed in leads table (Should be, but if not it can cause slow import.)
If you don’t know how to do these things I recommend to read more the forums or get pro Mautic help.