# Campaign not sending email and cannot change contact's segment

**URL:** <https://forum.mautic.org/t/campaign-not-sending-email-and-cannot-change-contacts-segment/21014>\
**Category:** Product Support\
**Tags:** mautic-3\
**Created:** [September 25, 2021, 4:20pm UTC](https://forum.mautic.org/t/campaign-not-sending-email-and-cannot-change-contacts-segment/21014 "2021-09-25T16:20:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scribeage](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/scribeage/32/5278_2.png) [@scribeage](https://forum.mautic.org/u/scribeage)\
**Post date:** [September 25, 2021, 4:20pm UTC](https://forum.mautic.org/t/campaign-not-sending-email-and-cannot-change-contacts-segment/21014/1 "2021-09-25T16:20:57Z")

</div>

**Your software**  
My Mautic version is: 3.3.4  
My PHP version is: 7.3.30  
My Database type and version is: 5.7.35

**Your problem**  
My problem is: Campaign does not send emails out. Email remains pending. Test email works perfectly, and email send to individuals contact delivered correctly. Just the campaign that refuses to send an email out and can’t assign a contact to a segment until I do it manually.

These errors are showing in the log: [2021-09-25 15:00:07] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DeadlockException: “An exception occurred while executing ‘UPDATE mauru\_page\_hits SET lead\_id = 364, tracking\_id = ? WHERE tracking\_id = ?’ with params [“rf9t10ttiav3tbemphqrqpr”, “z7bq941mcel7htah3q2zxro”]: Deadlock found when trying to get lock; try restarting transaction” at /home/scribeag/public\_html/campaign/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 34 {“exception”:"[object] (Doctrine\DBAL\Exception\DeadlockException(code: 0): An exception occurred while executing ‘UPDATE mauru\_page\_hits SET lead\_id = 364, tracking\_id = ? WHERE tracking\_id = ?’ with params [“rf9t10ttiav3tbemphqrqpr”, “z7bq941mcel7htah3q2zxro”]:\n\nDeadlock found when trying to get lock; try restarting transaction at /home/scribeag/public\_html/campaign/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:34, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Deadlock found when trying to get lock; try restarting transaction at /home/scribeag/public\_html/campaign/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:151)"}

Steps I have tried to fix the problem: I have checked the Cron Job and I think everything is working fine. Below are the cron jobs:  
/usr/local/bin/ea-php73/home/scribeag/public\_html/campaign/bin/console mautic:segments:update  
/usr/local/bin/ea-php73/home/scribeag/public\_html/campaign/bin/console mautic:campaigns:update  
/usr/local/bin/ea-php73/home/scribeag/public\_html/campaign/bin/console mautic:campaigns:trigger  
/usr/local/bin/ea-php73/home/scribeag/public\_html/campaign/bin/console mautic:email:fetch\>/dev/null 2\>&1  
/usr/local/bin/ea-php73/home/scribeag/public\_html/campaign/bin/console mautic:emails:send\>/dev/null 2\>&1

I will appreciate every help to get this fix. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [September 27, 2021, 4:08am UTC](https://forum.mautic.org/t/campaign-not-sending-email-and-cannot-change-contacts-segment/21014/2 "2021-09-27T04:08:44Z")

</div>

How often are you running your crons? Are there overlaps in execution maybe?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [September 27, 2021, 1:39pm UTC](https://forum.mautic.org/t/campaign-not-sending-email-and-cannot-change-contacts-segment/21014/3 "2021-09-27T13:39:25Z")

</div>

Hi there

Some maybe basic questions:

1. Are the emails published ?
2. Are the emails of type Template (and not segment) ?
3. Are you able to see if there is anything in your spool ? /mautic/var/spool/
