Mautic general error 1467 failed to read auto-increment value from storage engine

Your software
My Mautic version is:4.0
My PHP version is:7.4
My Database type and version is: MariaDB 10.3

Your problem
My problem is: email queue not working and email unable to send but normal email process is working fine.

These errors are showing in the log:
Error 1 :

[2021-09-13 09:37:05] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: “An exception occurred while executing ‘INSERT INTO dsijemail_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 [“a_DSIJOnlineSubs@dsij.in”, “2021-09-13 09:37:05”, 0, 0, 0, null, “613f1bc19ec08660772051”, 0, “email”, 1, “a:14:{s:36:”{dynamiccontent=“Dynamic Content 1”}”;s:23:“Default Dynamic Content”;s:18:"{unsubscribe_text}";s:125:"](file:///%22https://////mauto.dsij.in///email///view///613f19ab3b0e4824727059///%22)Unsubscribe</a> to no longer receive emails from us.";s:17:"{unsubscribe_url}";s:62:“https://mauto.dsij.in/email/unsubscribe/613f1bc19ec08660772051”;s:14:"{webview_text}";s:116:"[Having trouble reading this email? Click here.</a>";s:13:"{webview_url}";s:55:“https://mauto.dsij.in/email/view/613f1bc19ec08660772051";s:11:"{signature}";s:27:"Best regards, rajesh padode”;s:9:"{subject}";s:9:“Amar Test”;s:18:"{ownerfield=email}";s:15:“rajeshp@dsij.in”;s:22:"{ownerfield=firstname}";s:6:“rajesh”;s:21:"{ownerfield=lastname}";s:6:“padode”;s:21:"{ownerfield=position}";s:0:"";s:22:"{ownerfield=signature}";s:0:"";s:37:"{trackable=8b20c86cd559744e0b69b087d}";s:270:“Subscribe To Flash News Investment Newsletter, 0, null, “a:0:{}”, 1, “18”, 2, null, “bd6253650515948a01b49ffb28a0f9aa”]: SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine” at /var/www/html/mautic/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 dsijemail_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 “a_DSIJOnlineSubs@dsij.in”, “2021-09-13 09:37:05”, 0, 0, 0, null, “613f1bc19ec08660772051”, 0, “email”, 1, “a:14:{s:36:\”{dynamiccontent=\“Dynamic Content 1\”}\";s:23:\“Default Dynamic Content\”;s:18:\"{unsubscribe_text}\";s:125:\"[Unsubscribe<\/a> to no longer receive emails from us.\";s:17:\"{unsubscribe_url}\";s:62:\“https:\/\/mauto.dsij.in\/email\/unsubscribe\/613f1bc19ec08660772051\”;s:14:\"{webview_text}\";s:116:\"](file:///%22https://////mauto.dsij.in///email///unsubscribe///613f1bc19ec08660772051///%22)[Having trouble reading this email? Click here.<\/a>\";s:13:\"{webview_url}\";s:55:\“https:\/\/mauto.dsij.in\/email\/view\/613f1bc19ec08660772051\”;s:11:\"{signature}\";s:27:\“Best regards, rajesh padode\”;s:9:\"{subject}\";s:9:\“Amar Test\”;s:18:\"{ownerfield=email}\";s:15:\“rajeshp@dsij.in\”;s:22:\"{ownerfield=firstname}\";s:6:\“rajesh\”;s:21:\"{ownerfield=lastname}\";s:6:\“padode\”;s:21:\"{ownerfield=position}\";s:0:\"\";s:22:\"{ownerfield=signature}\";s:0:\"\";s:37:\"{trackable=8b20c86cd559744e0b69b087d}\";s:270:\“https:\/\/mauto.dsij.in\/r\/8b20c86cd559744e0b69b087d?ct=YTo1OntzOjY6InNvdXJjZSI7YToyOntpOjA7czo1OiJlbWFpbCI7aToxO2k6MTt9czo1OiJlbWFpbCI7aToxO3M6NDoic3RhdCI7czoyMjoiNjEzZjFiYzE5ZWMwODY2MDc3MjA1MSI7czo0OiJsZWFkIjtzOjI6IjE4IjtzOjc6ImNoYW5uZWwiO2E6MTp7czo1OiJlbWFpbCI7aToxO319&\”;s:16:\"{tracking_pixel}\";s:54:\“https:\/\/mauto.dsij.in\/email\/613f1bc19ec08660772051.gif\”;}", 0, null, “a:0:{}”, 1, “18”, 2, null, “bd6253650515948a01b49ffb28a0f9aa”]:\n\nSQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine at /var/www/html/mautic/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/mautic/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/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"}

Error 2 :

[2021-09-13 09:59:27] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: “An exception occurred while executing ‘INSERT INTO dsijemail_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 [“shyamalm@dsij.in”, “2021-09-13 09:59:27”, 0, 0, 0, null, “613f20ff6a709978477841”, 0, “email”, 4, “a:13:{s:36:”{dynamiccontent=“Dynamic Content 1”}”;s:23:“Default Dynamic Content”;s:18:"{unsubscribe_text}";s:125:"](file:///%22https://////mauto.dsij.in///email///view///613f1bc19ec08660772051///%22)Unsubscribe</a> to no longer receive emails from us.";s:17:"{unsubscribe_url}";s:62:“https://mauto.dsij.in/email/unsubscribe/613f20ff6a709978477841”;s:14:"{webview_text}";s:116:"[Having trouble reading this email? Click here.</a>";s:13:"{webview_url}";s:55:“https://mauto.dsij.in/email/view/613f20ff6a709978477841";s:11:"{signature}";s:27:"Best regards, rajesh padode”;s:9:"{subject}";s:7:“Testing”;s:18:"{ownerfield=email}";s:15:“rajeshp@dsij.in”;s:22:"{ownerfield=firstname}";s:6:“rajesh”;s:21:"{ownerfield=lastname}";s:6:“padode”;s:21:"{ownerfield=position}";s:0:"";s:22:"{ownerfield=signature}";s:0:"";s:16:"{tracking_pixel}";s:54:“https://mauto.dsij.in/email/613f20ff6a709978477841.gif";}", 0, null, “a:0:{}”, 4, “2”, 21, null, “5bab6213a0607033d404e8f819a2774a”]: SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine” at /var/www/html/mautic/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 dsijemail_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 “shyamalm@dsij.in”, “2021-09-13 09:59:27”, 0, 0, 0, null, “613f20ff6a709978477841”, 0, “email”, 4, “a:13:{s:36:\”{dynamiccontent=\“Dynamic Content 1\”}\";s:23:\“Default Dynamic Content\”;s:18:\"{unsubscribe_text}\";s:125:\"[Unsubscribe<\/a> to no longer receive emails from us.\";s:17:\"{unsubscribe_url}\";s:62:\“https:\/\/mauto.dsij.in\/email\/unsubscribe\/613f20ff6a709978477841\”;s:14:\"{webview_text}\";s:116:\"](file:///%22https://////mauto.dsij.in///email///unsubscribe///613f20ff6a709978477841///%22)[Having trouble reading this email? Click here.<\/a>\";s:13:\"{webview_url}\";s:55:\“https:\/\/mauto.dsij.in\/email\/view\/613f20ff6a709978477841\”;s:11:\"{signature}\";s:27:\“Best regards, rajesh padode\”;s:9:\"{subject}\";s:7:\“Testing\”;s:18:\"{ownerfield=email}\";s:15:\“rajeshp@dsij.in\”;s:22:\"{ownerfield=firstname}\";s:6:\“rajesh\”;s:21:\"{ownerfield=lastname}\";s:6:\“padode\”;s:21:\"{ownerfield=position}\";s:0:\"\";s:22:\"{ownerfield=signature}\";s:0:\"\";s:16:\"{tracking_pixel}\";s:54:\“https:\/\/mauto.dsij.in\/email\/613f20ff6a709978477841.gif\”;}", 0, null, “a:0:{}”, 4, “2”, 21, null, “5bab6213a0607033d404e8f819a2774a”]:\n\nSQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine at /var/www/html/mautic/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/mautic/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/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"} ](file:///%22https://////mauto.dsij.in///email///view///613f20ff6a709978477841///%22)

Steps I have tried to fix the problem: no idea what to do.

Hi, i had the same error message “General error: 1467 Failed to read auto-increment value from storage engine …” at a mautic v4.1.1 install with php 7.4. In my case with this error i was not able to create new contacts.

I was able to fix the problem with following mysql-command:

ALTER TABLE`leads`AUTO_INCREMENT =1;
4 Likes

This sorts the issue for me temporarily but every other day it starts happening again and always have to run the command again :frowning:

The following query does fix it for me,

ALTER TABLE email_stats CHANGE id id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;

Hi all, got a question about this.

Does someone have a permanent solution to this?

Did you delete anything from Mautic cia Mysql?

No.
Rhe “ALTER TABLE email_stats AUTO_INCREMENT =1” fixes the error for me, but there has to be a way to avoid this error altogether.

Not that I am aware of, but you make a good point, we should look into permanent solution for this.

2 Likes