Campaign Understanding Deep Diving with MySQL - HELP URGENT

We are running a campaign that entails emails, push and SMS. We are starting to analyze our campaign and are chasing our tails on what is going on.

This is what the campaign looks like:

Campaign Actions Results look like this:

Campaign Conditions like this:

Decisions like this:

My first question is how come only 2275 contacts had completed actions on Push: MNC-P1.
If we look at the results for Condition-1 there was a 68.7% success rate on an amount of 48,567 leads. This would be ±33k. Now I have to try and understand what does success rate mean over here ?? Does this mean that 33K leads met the condition ? or 33K people went through this condition ?

I have so many more questions from this campaign, but want to tackle one thing at a time.

Is there a fundamental issue with sending leads down two paths from Send: MNC-M1 to an Open Decision and a Condition ?

When looking at a contact card, I see this in the upcoming events:
image

Now this time has already passed.
Current server time is:
image

Here are some strange log entries I am seeing from today:
[2021-11-08 13:39:04] mautic.ERROR: CAMPAIGN: An exception occurred while executing ‘INSERT INTO campaign_lead_event_log (rotation, date_triggered, is_scheduled, trigger_date, system_triggered, metadata, channel, channel_id, non_action_path_taken, event_id, lead_id, campaign_id, ip_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [3, “2021-11-08 13:39:04”, 1, “2021-11-09 08:00:00”, 1, “a:0:{}”, null, null, 0, 330, “794303”, 24, null]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘330-794303-3’ for key ‘campaign_rotation’
[2021-11-08 13:40:08] mautic.ERROR: CAMPAIGN: An exception occurred while executing ‘INSERT INTO campaign_lead_event_log (rotation, date_triggered, is_scheduled, trigger_date, system_triggered, metadata, channel, channel_id, non_action_path_taken, event_id, lead_id, campaign_id, ip_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [3, “2021-11-08 13:40:08”, 1, “2021-11-09 08:00:00”, 1, “a:0:{}”, null, null, 0, 330, “795287”, 24, null]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘330-795287-3’ for key ‘campaign_rotation’
[2021-11-08 13:46:01] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\UniqueConstraintViolationException: “An exception occurred while executing ‘INSERT INTO lead_tags_xref (lead_id, tag_id) VALUES (?, ?)’ with params [“22142”, 4]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘22142-4’ for key ‘PRIMARY’” at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 74 {“exception”:"[object] (Doctrine\DBAL\Exception\UniqueConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO lead_tags_xref (lead_id, tag_id) VALUES (?, ?)’ with params [“22142”, 4]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘22142-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:74, Doctrine\DBAL\Driver\PDO\Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘22142-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘22142-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"}
[2021-11-08 13:51:56] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\UniqueConstraintViolationException: “An exception occurred while executing ‘INSERT INTO lead_tags_xref (lead_id, tag_id) VALUES (?, ?)’ with params [“255040”, 4]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘255040-4’ for key ‘PRIMARY’” at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 74 {“exception”:"[object] (Doctrine\DBAL\Exception\UniqueConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO lead_tags_xref (lead_id, tag_id) VALUES (?, ?)’ with params [“255040”, 4]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘255040-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:74, Doctrine\DBAL\Driver\PDO\Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘255040-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘255040-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"}
[2021-11-08 13:52:16] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\UniqueConstraintViolationException: “An exception occurred while executing ‘INSERT INTO lead_tags_xref (lead_id, tag_id) VALUES (?, ?)’ with params [“187091”, 4]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘187091-4’ for key ‘PRIMARY’” at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 74 {“exception”:"[object] (Doctrine\DBAL\Exception\UniqueConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO lead_tags_xref (lead_id, tag_id) VALUES (?, ?)’ with params [“187091”, 4]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘187091-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:74, Doctrine\DBAL\Driver\PDO\Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘187091-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘187091-4’ for key ‘PRIMARY’ at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"}

This is all happening on Mautic 4.0.1

I see that most of my campaigns are stuck now. Is there a way to clear all the campaigns, even if it is through the sql db that will be safe to do.

Hi - I seem to have solved this issue. Well I lie - @joeyk seemed to have saved the issue for me by pointing me in the right direction to the required PR: Fix duplicate entry for key campaign_rotation by kuzmany · Pull Request #9639 · mautic/mautic · GitHub

Now I am not a technical person and was having a chat with @rcheesley and she was kind enough to take the time to explain how I go ahead and change the required files inside this PR.

So a HUGE shoutout and thank you to both @joeyk & @rcheesley. The Mautic community is an amazing place and I am privileged to be part of it and contribute where I can.

If anyone needs any direction or help please feel free to hit me up.

1 Like