Log Errors

Your software
My Mautic version is: 3.2.1
My PHP version is: PHP Version 7.3.27-1~deb10u1
My Database type and version is: Maria DB - sorry how do I find the version please?

Your problem
As far as I can tell Mautic is working fine but I have the following errors in the log:

These errors are showing in the log:
[2021-06-05 06:48:15] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DeadlockException: “An exception occurred while executing ‘UPDATE leads SET date_modified = ?, last_active = ? WHERE id = ?’ with params [“2021-06-05 06:48:15”, “2021-06-05 06:48:15”, “16480”]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction” at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 34 {“exception”:"[object] (Doctrine\DBAL\Exception\DeadlockException(code: 0): An exception occurred while executing ‘UPDATE leads SET date_modified = ?, last_active = ? WHERE id = ?’ with params [“2021-06-05 06:48:15”, “2021-06-05 06:48:15”, “16480”]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:34, Doctrine\DBAL\Driver\PDOException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)"}
[2021-06-05 06:54:23] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DeadlockException: “An exception occurred while executing ‘UPDATE leads SET date_modified = ?, last_active = ? WHERE id = ?’ with params [“2021-06-05 06:54:23”, “2021-06-05 06:54:23”, “51073”]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction” at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 34 {“exception”:"[object] (Doctrine\DBAL\Exception\DeadlockException(code: 0): An exception occurred while executing ‘UPDATE leads SET date_modified = ?, last_active = ? WHERE id = ?’ with params [“2021-06-05 06:54:23”, “2021-06-05 06:54:23”, “51073”]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:34, Doctrine\DBAL\Driver\PDOException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)"}
[2021-06-05 08:54:52] mautic.NOTICE: PHP Notice - Undefined index: ct - in file /var/www/html/app/bundles/PageBundle/Controller/PublicController.php - at line 451 {“redirectId”:“32b7886531d567fc6f6e7318b”,“logger”:"[object] (Symfony\Bridge\Monolog\Logger: {})",“redirectModel”:"[object] (Mautic\PageBundle\Model\RedirectModel: {})",“redirect”:"[object] (Mautic\PageBundle\Entity\Redirect: Mautic\PageBundle\Entity\Redirect with ID #608)",“url”:“Property To Let In Northwood Road, Whitstable £575 Pcm | David Clarke Estate Agents”:}
[2021-06-05 10:03:15] mautic.WARNING: PHP Warning - file_put_contents(/var/www/html/var/cache/prod/lastUpdateCheck.txt): failed to open stream: Permission denied - in file /var/www/html/app/bundles/CoreBundle/Helper/UpdateHelper.php - at line 197 {“overrideCache”:false,“cacheFile”:"/var/www/html/var/cache/prod/lastUpdateCheck.txt",“updateStability”:“stable”,“release”:"[object] (Mautic\CoreBundle\Helper\Update\Github\Release: {})",“data”:{“error”:false,“message”:“mautic.core.updater.update.available”,“version”:“3.3.3”,“announcement”:“https://github.com/mautic/mautic/releases/tag/3.3.3",“package”:“https://github.com/mautic/mautic/releases/download/3.3.3/3.3.3-update.zip”,“stability”:“stable”,"checkedTime”:1622883795}}

Steps I have tried to fix the problem: Nothing as I have not found what this error is causing.

Please can someone suggest what the issue is and how to fix.

Thank you!

Paul

This is an indication that mautic was trying to access an item in your database that was already in use by another process. Generally it will execute on the next cron job. Not a big worry unless it is preventing critical campaign functions from running. In that case adjust your cron timing.

Thanks very much EJL. It’s good to know.