Errors with Cron jobs after updating to Mautic 3


I’ve just updated my installation to M3, and updated my cron jobs, but I’m getting the following error on all 3 jobs:

/var/www/vhosts/[redacted]/bin/console mautic:campaigns:trigger" completed with error in 0 seconds, output:

PHP Warning: Class ‘Tightenco\Collect\Support\LazyCollection’ not found in /var/www/vhosts/[redacted]/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
PHP Parse error: syntax error, unexpected ‘=’ in /var/www/vhosts/[redacted]/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611

Hi there, and welcome to the Mautic Community Forums!

Were there any errors when you performed the migration?

I did have this:

ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations. Please try again by refreshing this page.

However, I think that was more to do with a PHP timeout, as it all went through fine after I refreshed. I’ve also updated the timeout settings in php so scripts can run for 240 seconds just in case it causes issues in the future

1 Like

I’ve also just tried to clear the cache from the command line and I get the same error

OK, can you please share your PHP version also?

How did you install the original 2.x Mautic instance, with a download from or some other way?

Mautic 2 was originally installed with a download from, then upgraded through the dashboard.

I’m running PHP v7.3.19, and MySQL v5.7.30.

Everything is running on a Plesk Obsidian server on Ubuntu 18


I was also seeing some slowness on Plesk Obsidian, increasing the timeout helped there. It’s indeed possible to refresh the page when you’re doing the UI upgrade to continue the process where it stalled, so I think your database should be OK.

We did see a similar warning about LazyCollection in this topic: Mautic 3.0 Installation Error - Row size too large

You seem to be using the correct PHP and MySQL versions, so that looks good to me. Saw a similar error in but there the user was running the wrong PHP version.

At this point I’m not sure what is causing this warning to show up for you. Could you maybe, just to be sure, remove your cache folder and try again? Does that make any difference?


I’ve come across those threads as well. The tighten/collect seems to be causing issues for multiple people, so maybe it needs to be looked into?

I had already tried deleting the cache. For some reason on plesk, I always have to go to the CLI and change the ownership of the cache files for things to work normally again. This started happening after having to revert to a backup in the past.

As this is a live version of mautic that I actually need running, I’ve reverted back to 2.16.3. Would there be a way to create a fresh install of V3 and link it to the existing database? When I create fresh installs things seem to work so much better.

@coffeeandspice you can theoretically set up a fresh installation of V3, then restore your M2 database to it and run bin/console doctrine:migrations:migrate --no-interaction for the M3 database migrations to run. If you had any custom settings/plugins/themes you’ll need to restore those from the M2 installation. For an overview of the configuration parameters that have changed in M3, see We haven’t tested this so not sure it will work as expected.

The Mautic 3 upgrade script does actually remove the old M2 installation completely (then restores settings/plugins/themes/media from M2) and creates fresh cache, so there shouldn’t be any reason for it not to work.

Would you mind trying the following:

  • Copy the M2 instance in Plesk using the “Copy website” feature, to e.g. a subdomain
  • Set the PHP timeout to 480 on the site in Plesk
  • Run the upgrade script again on your cloned version

Curious to hear if that will work; I’m just trying to understand whether this is a local (server-related) issue or whether we need to make some changes to the upgrade script. Thanks in advance! :slight_smile:

I’ll try that later and keep you posted.

I’ll also try the fresh install and database migration and let you know how that goes too.

1 Like

Hi @dennisameling,

I finally got round to testing the upgrade. I increased the PHP timeout to 480 and it made no difference.

I had this too:

[16-Aug-2020 10:08:00 UTC] PHP Warning: Class ‘Tightenco\Collect\Support\LazyCollection’ not found in …/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
[16-Aug-2020 10:08:00 UTC] PHP Parse error: syntax error, unexpected ‘=’ in …/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611

It was because MAUTIC requires PHP 7.2 and even though I had upgraded an htaccess setting had it at 7.0 still.

I also got a memory error after that was fixed:

[16-Aug-2020 10:53:07 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/jewishdata/public_html/newsletter/app/bundles/LeadBundle/Model/CompanyModel.php on line 367
[16-Aug-2020 10:53:07 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/jewishdata/public_html/newsletter/vendor/psr/log/Psr/Log/LogLevel.php on line 1

Which we fixed by increasing the allotted memory via an ini file.

I also have this error, but my PHP is 7.3 . Mautic version 3.2.1. MySQL

Mautic was working correctly, but when I tried to whitelist the IP address of CloudFlare and the A2hosting host, I changed the configuration settings on Mautic dashboard.

But I did it wrong and turned on a 404 throughout Mautic.

So I changed in …/app/config/local.php deleting the host and the IP I entered in the lines:

trusted_hosts' => array(

trusted_proxies' => array(


Now I cannot access Mautic and instead have these messages:

Warning : Class ‘Tightenco\Collect\Support\LazyCollection’ not found in /home/ on line 19

Parse error : syntax error, unexpected ‘=’ in /home/ on line 611

Now even if I turn back the previous local.php file which I made a copy I have not even the previous 404. I have removed the content of the cache folder also.

I would appreciate so much any kind of help or suggestions.
Thank you in advance

In SSH run php -v to ensure CLI PHP version is correct