Regarding issues on Mautic

Your software
My Mautic version is: 4.4.9
My PHP version is: 8.0.29
My Database type and version is: 5.7.23- |Doctrine driver|pdo_mysql|

Your problem
My problem is:
we have make some cmapaign workflow which execute based on a segment filter on eveyhour. But problem is that our complex workflow throwing 500 internal server error sometimes during execution of the workflow. So If we move to another hosting like Mautic hosting so our campaign will work there fine? Here is some error logs we received on mautic error logs:
[2023-08-11 00:00:10] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\ConnectionLost: “An exception occurred while executing ‘SELECT u0_.is_published AS is_published_0, u0_.date_added AS date_added_1, u0_.created_by AS created_by_2, u0_.created_by_user AS created_by_user_3, u0_.date_modified AS date_modified_4, u0_.modified_by AS modified_by_5, u0_.modified_by_user AS modified_by_user_6, u0_.checked_out AS checked_out_7, u0_.checked_out_by AS checked_out_by_8, u0_.checked_out_by_user AS checked_out_by_user_9, u0_.id AS id_10, u0_.username AS username_11, u0_.password AS password_12, u0_.first_name AS first_name_13, u0_.last_name AS last_name_14, u0_.email AS email_15, u0_.position AS position_16, u0_.timezone AS timezone_17, u0_.locale AS locale_18, u0_.last_login AS last_login_19, u0_.last_active AS last_active_20, u0_.preferences AS preferences_21, u0_.signature AS signature_22, r1_.is_published AS is_published_23, r1_.date_added AS date_added_24, r1_.created_by AS created_by_25, r1_.created_by_user AS created_by_user_26, r1_.date_modified AS date_modified_27, r1_.modified_by AS modified_by_28, r1_.modified_by_user AS modified_by_user_29, r1_.checked_out AS checked_out_30, r1_.checked_out_by AS checked_out_by_31, r1_.checked_out_by_user AS checked_out_by_user_32, r1_.id AS id_33, r1_.name AS name_34, r1_.description AS description_35, r1_.is_admin AS is_admin_36, r1_.readable_permissions AS readable_permissions_37, u0_.role_id AS role_id_38 FROM users u0_ LEFT JOIN roles r1_ ON u0_.role_id = r1_.id WHERE (u0_.username = ? OR u0_.email = ?) AND u0_.is_published = ?’ with params [“admin”, “admin”, 1]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away” at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 {“exception”:“[object] (Doctrine\DBAL\Exception\ConnectionLost(code: 0): An exception occurred while executing ‘SELECT u0_.is_published AS is_published_0, u0_.date_added AS date_added_1, u0_.created_by AS created_by_2, u0_.created_by_user AS created_by_user_3, u0_.date_modified AS date_modified_4, u0_.modified_by AS modified_by_5, u0_.modified_by_user AS modified_by_user_6, u0_.checked_out AS checked_out_7, u0_.checked_out_by AS checked_out_by_8, u0_.checked_out_by_user AS checked_out_by_user_9, u0_.id AS id_10, u0_.username AS username_11, u0_.password AS password_12, u0_.first_name AS first_name_13, u0_.last_name AS last_name_14, u0_.email AS email_15, u0_.position AS position_16, u0_.timezone AS timezone_17, u0_.locale AS locale_18, u0_.last_login AS last_login_19, u0_.last_active AS last_active_20, u0_.preferences AS preferences_21, u0_.signature AS signature_22, r1_.is_published AS is_published_23, r1_.date_added AS date_added_24, r1_.created_by AS created_by_25, r1_.created_by_user AS created_by_user_26, r1_.date_modified AS date_modified_27, r1_.modified_by AS modified_by_28, r1_.modified_by_user AS modified_by_user_29, r1_.checked_out AS checked_out_30, r1_.checked_out_by AS checked_out_by_31, r1_.checked_out_by_user AS checked_out_by_user_32, r1_.id AS id_33, r1_.name AS name_34, r1_.description AS description_35, r1_.is_admin AS is_admin_36, r1_.readable_permissions AS readable_permissions_37, u0_.role_id AS role_id_38 FROM users u0_ LEFT JOIN roles r1_ ON u0_.role_id = r1_.id WHERE (u0_.username = ? OR u0_.email = ?) AND u0_.is_published = ?’ with params ["admin", "admin", 1]:\n\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\DBAL\Driver\PDO\Exception(code: HY000): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: HY000): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)”} {“hostname”:“vultr”,“pid”:688990}
[2023-08-11 01:00:03] mautic.WARNING: MaxMind license key is required. {“hostname”:“vultr”,“pid”:812813}
[2023-08-11 01:00:03] mautic.ERROR: Failed to fetch remote IP data: URI must be a string or UriInterface {“hostname”:“vultr”,“pid”:812813}
[2023-08-11 01:00:03] mautic.WARNING: MaxMind license key is required. {“hostname”:“vultr”,“pid”:812813}
[2023-08-11 04:21:26] mautic.NOTICE: PHP Notice - SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) - in file /var/www/html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php - at line 106 {“hostname”:“vultr”,“pid”:808037}
[2023-08-11 05:11:34] mautic.NOTICE: PHP Notice - SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) - in file /var/www/html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php - at line 106 {“hostname”:“vultr”,“pid”:808049}
[2023-08-11 05:59:06] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 32 {“hostname”:“vultr”,“pid”:808041}
[2023-08-11 05:59:06] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 33 {“hostname”:“vultr”,“pid”:808041}
[2023-08-11 05:59:06] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 34 {“hostname”:“vultr”,“pid”:808041}
[2023-08-11 05:59:06] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 35 {“hostname”:“vultr”,“pid”:808041}
[2023-08-11 05:59:49] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 32 {“hostname”:“vultr”,“pid”:808037}
[2023-08-11 05:59:49] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 33 {“hostname”:“vultr”,“pid”:808037}
[2023-08-11 05:59:49] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 34 {“hostname”:“vultr”,“pid”:808037}
[2023-08-11 05:59:49] mautic.WARNING: PHP Warning - Trying to access array offset on value of type null - in file /var/www/html/app/bundles/CampaignBundle/Controller/EventController.php - at line 35 {“hostname”:“vultr”,“pid”:808037}
[2023-08-11 07:56:07] mautic.WARNING: PHP Warning - Undefined array key “path” - in file /var/www/html/app/bundles/CoreBundle/Controller/ExceptionController.php - at line 111 {“hostname”:“vultr”,“pid”:847399}
[2023-08-11 09:05:31] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\NotNullConstraintViolationException: “An exception occurred while executing ‘INSERT INTO sms_messages (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, name, description, lang, message, sms_type, publish_up, publish_down, sent_count, category_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2023-08-11 09:05:31”, 1, “Wake Admin”, null, null, null, null, null, null, “Day 5 SMS1”, null, “en”, null, “template”, null, null, 0, null]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null” at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 125 {“exception”:“[object] (Doctrine\DBAL\Exception\NotNullConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO sms_messages (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, name, description, lang, message, sms_type, publish_up, publish_down, sent_count, category_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, "2023-08-11 09:05:31", 1, "Wake Admin", null, null, null, null, null, null, "Day 5 SMS1", null, "en", null, "template", null, null, 0, null]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:125, Doctrine\DBAL\Driver\PDO\Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)”} {“hostname”:“vultr”,“pid”:820385}
[2023-08-11 09:06:03] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\NotNullConstraintViolationException: “An exception occurred while executing ‘INSERT INTO sms_messages (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, name, description, lang, message, sms_type, publish_up, publish_down, sent_count, category_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2023-08-11 09:06:03”, 1, “Wake Admin”, null, null, null, null, null, null, “Day 5 SMS1”, null, “en”, null, “template”, null, null, 0, null]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null” at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 125 {“exception”:“[object] (Doctrine\DBAL\Exception\NotNullConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO sms_messages (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, name, description, lang, message, sms_type, publish_up, publish_down, sent_count, category_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, "2023-08-11 09:06:03", 1, "Wake Admin", null, null, null, null, null, null, "Day 5 SMS1", null, "en", null, "template", null, null, 0, null]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:125, Doctrine\DBAL\Driver\PDO\Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘message’ cannot be null at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)”} {“hostname”:“vultr”,“pid”:817219}

and Here is attached screenshots of my campaigns workflow

sounds like you are trying to send an empty SMS text message? This should be caught by Mautic but obviously is not, but an empty SMS does not make sense anyway :slight_smile:

Hi @ekke
Thanks for the reply of my forum. So Is it a reason of throwing errors of 500 internal server? or is there a specific step we need to fix? Hope to hear from you soon.

Regards
Shekhar

Yes, this portion seems to be the root cause to me:

Do you happen to have any SMS templates with no content?

Hi @ekke
We have make some templates for testing purpose only with the content like this
Hello {contactfield=firstname}, Revitalist here. We’ve received your Home Therapy free assessment request. Reply ‘HOME’ and we will call you.

Hi,

i think @ekke is right here. Its worth exploring why the sms messages that you try to send / insert into the table have message attribute null.

Hi @mzagmajster
Thanks for the clarifying about this. I am new to Mautic so having a difficult time to understand all of this actions. Could you please tell me what is the difference between these two?

It’s actually written there:

  1. Template you can use in campaigns
  2. List you can use for 1x scheduled sms blast
1 Like

If you are sure you are not sending empty messages by mistake, ti could be that the issue lies else where. I would debug SMS transport (plugin you use to send sms) and try to figure out how it comes to the conclusion the message is null.

Hi @mzagmajster
Yes sure you can have a look with me and connect through any desk or TeamViewer so I will walk you through my workflow diagram I made if that’s possible by you? Many thanks.

Hi @shekar, I can look into it, but not before Friday. Please send me PM with your email so I can schedule a short meeting on Friday (if you don’t solve the problem by then).

Regards, M.

Hi @mzagmajster,
Thanks for the reply. Yes I am trying to resolve the things asap.
Thanks