mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\LockWaitTimeoutException

Your software
My Mautic version is: 4.4.7
My PHP version is: 7.4.33
My Database type and version is: 8.0.31-23

Your problem
My problem is:
Hello people.

I have a Mautic in version 4.4.7 in docker, which is giving me the following error temporarily. That is, it stops working and comes back on its own.

Can any of you help me.

Thank you

These errors are showing in the log:
[2023-09-22 11:15:23] mautic.ERROR: Invalid clickthrough value: 3DYTo1OntzOjY6In= null {“hostname”:“mauticljvi6l3”,“pid”:3855471}
[2023-09-22 11:48:57] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\LockWaitTimeoutException: “An exception occurred while executing ‘UPDATE leads SET last_active = ? WHERE id = ?’ with params [“2023-09-22 11:48:07”, “7076”]: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction” at /var/www/html/vendor/doctrine /dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 54 {“exception”:"[object] (Doctrine\DBAL\Exception\LockWaitTimeoutException(code: 0): An exception occurred while executing ‘UPDATE leads SET last_active = ? WHERE id = ?’ with params ["2023-09-22 11:48:07", "7076"]:\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded ; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:54, Doctrine\DBAL\Driver\PDO\Exception(code: HY000) : SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException( code: HY000): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117) "} {“hostname”:“mauticljvi6l3”,“pid”:3887889}

Steps I have tried to fix the problem:

I find chatGPT super helpful in turning these error logs into lay person readable english. It may not provide a solution but it often reveals topics one one can google.

The error messages you’ve provided appear to be related to a Mautic installation. Mautic is an open-source marketing automation software, and the error messages you’ve posted indicate issues with the database operations and clickthrough tracking.

Let’s break down the error messages:

  1. mautic.ERROR: Invalid clickthrough value: 3DYTo1OntzOjY6In= null: This error suggests that there is an issue with the clickthrough tracking in Mautic. It appears that there is an invalid clickthrough value or data in the database. You may need to investigate the specific clickthrough link or data that is causing this error and fix it.
  2. mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\LockWaitTimeoutException: This error is a critical exception related to the database operation. It’s indicating that there is a lock wait timeout while trying to execute a SQL update statement on the “leads” table. This can happen when there are concurrent transactions or long-running transactions that are causing locks on the database tables.The message “Lock wait timeout exceeded; try restarting transaction” suggests that the database is unable to complete the update due to locks from other transactions, and it’s recommending you to restart the transaction.

To address these issues:

  1. For the “Invalid clickthrough value” error, you’ll need to inspect the clickthrough tracking configuration and the specific data causing the error. Ensure that clickthrough URLs and data are correctly formatted and stored in the database.
  2. For the “Lock wait timeout” error, you can consider the following actions:
  • Check if there are any long-running database transactions that might be causing locks. These transactions might need to be optimized or, if possible, made more efficient.
  • Review your server’s database configuration for any settings related to lock timeouts and adjust them if necessary.
  • Monitor your server’s resource usage to ensure that it has enough resources to handle concurrent database transactions.

It’s important to keep in mind that these errors might be symptoms of underlying issues with your Mautic installation or server environment. If you’re unsure about how to resolve these issues, it may be a good idea to consult with a developer or Mautic expert who can provide more specific guidance based on your setup and requirements.

So it seems there is an issue with an invalid value in the DB. That might be what is causing the timeout error.

1 Like

Thanks, I’ll do that