My Mautic version is: v4.4.9 My PHP version is: PHP 7.4.33 (cli) (built: Nov 15 2022 06:03:30) ( NTS ) My Database type and version is: Server version: 5.7.42-46 Percona Server (GPL), Release 46, Revision e1995a8bb71
My problem is:
I’m running on docker. I checked and the cronjobs are running but I get this error repeatedly:
[CRON] In ConnectionFactory.php line 136:
[CRON]
[CRON] An exception occurred while establishing a connection to figure out your pl
[CRON] atform version.
[CRON] You can circumvent this by setting a 'server_version' configuration value
[CRON]
[CRON] For further information have a look at:
[CRON] https://github.com/doctrine/DoctrineBundle/issues/673
[CRON]
[CRON]
If I run the jobs manually they all run fine… how can I determine which is the offending one?
Also, I turned the queue on and my server froze a couple of times. I recently capped the max time to 60 seconds and it seems to be more stable.
I just made a new test which was to run all of the */15 jobs at once:
sudo -u www-data php /var/www/html/bin/console mautic:broadcasts:send & sudo -u www-data php /var/www/html/bin/console mautic:messages:send & sudo -u www-data php /var/www/html/bin/console mautic:emails:send & sudo -u www-data php /var/www/html/bin/console mautic:email:fetch & sudo -u www-data php /var/www/html/bin/console mautic:social:monitoring & sudo -u www-data php /var/www/html/bin/console mautic:webhooks:process & sudo -u www-data php /var/www/html/bin/console mautic:broadcasts:send effectively simulating the cron’d execution and got to see the error first hand so I guess the problem is some sort of deadlock being triggered by the simultaneous execution of all of this cronjobs.
I’ll try to space them out in time and see if this solved the issue.
Well I finally found my solution: I changed the parallel job execution to a sequential one. I noticed that if I spaced the cronjobs preventing them from running at the exact same time the MySQL server wouldn’t crash so often but then I figured it’d be easier to simply have them run one after the other instead of trying to calculate the best cronjob distribution.
So what I did was create a single job that would spawn all of the tasks (run-jobs.sh):