Your software
My PHP version is : 7.4.26
My MariaDB version is: 10.3.31-MariaDB-0ubuntu0.20.04.1
These errors are showing in the Mautic log :
mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘INSERT INTO email_stats
(email_address, date_sent, is_read, is_failed, viewed_in_browser, date_read, tracking_hash, retry_count, source, source_id, tokens, open_count, last_opened, open_details, email_id, lead_id, list_id, ip_id, copy_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [MY PARAMETERS]:
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine (uncaught exception) at /var/www/html/mautic4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 while running console command mautic:broadcasts:send
mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: “An exception occurred while executing ‘INSERT INTO email_stats (email_address, date_sent, is_read, is_failed, viewed_in_browser, date_read, tracking_hash, retry_count, source, source_id, tokens, open_count, last_opened, open_details, email_id, lead_id, list_id, ip_id, copy_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [MY PARAMETERS]:
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine” at /var/www/html/mautic4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 {“exception”:"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing ‘INSERT INTO email_stats (email_address, date_sent, is_read, is_failed, viewed_in_browser, date_read, tracking_hash, retry_count, source, source_id, tokens, open_count, last_opened, open_details, email_id, lead_id, list_id, ip_id, copy_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [MY PARAMETERS]:
\n\n
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine at /var/www/html/mautic4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128, Doctrine\DBAL\Driver\PDO\Exception(code: HY000):
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine at /var/www/html/mautic4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: HY000):
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine at /var/www/html/mautic4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"}
Your problem
My problem is :
When I send an email as a segment email, I get the error message " Uh oh! I think I broke it…"
The issue could be related to that did run a package update.
sudo apt get update
sudo apt get upgrade
Did see a notification about FPM, and I did check the status of FPM, it says enabled.
FYI, the active Server API according to the PHP Status is Apache 2.0 Handler.
The status check show that FPM is active.
Is FPM optional?
See notes from apt upgrade:
NOTICE: Not enabling PHP 7.4 FPM by default.
NOTICE: To enable PHP 7.4 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.4-fpm
Steps I have tried to fix the problem :
I made sure the permissions were set correctly
sudo find . -type f -not -perm 644 -exec chmod 644 {} +
sudo find . -type d -not -perm 644 -exec chmod 755 {} +
sudo chmod -R g+w var/cache/ var/logs/ app/config/
sudo chmod -R g+w media/files/ media/images/ translations/
I made sure ownership was set correctly
sudo chown -R www-data:www-data .
I cleared the cache
sudo rm -rf var/cache/*