Your software
My Mautic version is: 5.1.0
My PHP version is: 8.1.1
My Database type and version is: MySQL 5.7.23
Your problem
My problem is:
I understand shared hosting is an issue - we are currently evaluating Mautic and have it running in a shared hosting environment as well as a local docker container.
I’ve noticed similar issues with the import cron on both systems -
I set a batch size, each time the cron starts, it only processes that batch number. So, if I have it set at 1000, every 5 minutes, it will only process 1000 contacts. I assume that is expected.
However - occasionally, the job will not complete and then the next time it’s scheduled to kick off nothing happens.
I’m playing with the settings/timing to find the sweet spot on the shared hosting, knowing that there are more limits there, so decided to try in a docker so I could have more control and have access to the CLI and see more logging hopefully.
Here’s what I’m using for the command:
/usr/bin/php mautic/bin/console mautic:import --limit=1250 -v >> mautic/cron_log/contact_import_cron.log 2>&1
On the shared host, when it fails, it just gets to a percentage and stops, no additional logs, and then stops until I toggle the switch on the import history page. Even though while running well, the batch of records only takes 67.76s to complete, the next one will fail at 98% or 42% or whatever, with plenty of time until the next cron kickoff time.
I’m having similar issues on my docker, where the process just doesn’t kick off, but the logs are not getting populated so I’m not sure where to begin looking.
I did notice that I have to toggle this active/inactive switch in the UI after every failed cron run, is that expected?