[2026-08-13T22:00:05.436270+00:00] mautic.ERROR: Segment QB: Query Exception: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away {"query":"SELECT count(leadIdPrimary) count, max(leadIdPrimary) maxId, min(leadIdPrimary) minId FROM (SELECT DISTINCT orp.lead_id as leadIdPrimary, orp.lead_id as id, orp.leadlist_id FROM mtc_lead_lists_leads orp WHERE (orp.leadlist_id = :orpsegid) AND (orp.manually_added = '0') AND (orp.lead_id NOT IN (SELECT l.id FROM mtc_leads l WHERE (l.id NOT IN (SELECT pary.lead_id FROM mtc_lead_donotcontact pary WHERE (pary.reason = :paryreason) AND (pary.channel = :parychannel))) AND (l.optin = :parz) AND (l.id NOT IN (SELECT par10.lead_id FROM mtc_lead_donotcontact par10 WHERE (par10.reason = :par10reason) AND (par10.channel = :par10channel))) AND (l.id NOT IN (SELECT par11.lead_id FROM mtc_lead_donotcontact par11 WHERE (par11.reason = :par11reason) AND (par11.channel = :par11channel)))))) sss","parameters":{"paryreason":1,"parychannel":"email","parz":1,"par10reason":2,"par10channel":"email","par11reason":3,"par11channel":"email","orpsegid":7}} {"hostname":"ip-172-31-34-245","pid":832350} [2026-08-13T22:00:05.467281+00:00] mautic.ERROR: Doctrine\DBAL\Exception\ConnectionLost: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (uncaught exception) at /sites/mautic5/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 104 while running console command `mautic:segments:update` [stack trace] #0 /sites/mautic5/vendor/doctrine/dbal/src/Connection.php(1938): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() #1 /sites/mautic5/vendor/doctrine/dbal/src/Connection.php(1880): Doctrine\DBAL\Connection->handleDriverException() #2 /sites/mautic5/vendor/doctrine/dbal/src/Connection.php(1105): Doctrine\DBAL\Connection->convertExceptionDuringQuery() #3 /sites/mautic5/vendor/doctrine/dbal/src/Query/QueryBuilder.php(337): Doctrine\DBAL\Connection->executeQuery() #4 /sites/mautic5/docroot/app/bundles/LeadBundle/Segment/ContactSegmentService.php(296): Doctrine\DBAL\Query\QueryBuilder->executeQuery() #5 /sites/mautic5/docroot/app/bundles/LeadBundle/Segment/ContactSegmentService.php(170): Mautic\LeadBundle\Segment\ContactSegmentService->timedFetch() #6 /sites/mautic5/docroot/app/bundles/LeadBundle/Model/ListModel.php(436): Mautic\LeadBundle\Segment\ContactSegmentService->getOrphanedLeadListLeadsCount() #7 /sites/mautic5/docroot/app/bundles/LeadBundle/Command/UpdateLeadListsCommand.php(145): Mautic\LeadBundle\Model\ListModel->rebuildListLeads() #8 /sites/mautic5/docroot/app/bundles/LeadBundle/Command/UpdateLeadListsCommand.php(120): Mautic\LeadBundle\Command\UpdateLeadListsCommand->rebuildSegment() #9 /sites/mautic5/vendor/symfony/console/Command/Command.php(298): Mautic\LeadBundle\Command\UpdateLeadListsCommand->execute() #10 /sites/mautic5/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run() #11 /sites/mautic5/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand() #12 /sites/mautic5/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() #13 /sites/mautic5/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun() #14 /sites/mautic5/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun() #15 /sites/mautic5/bin/console(16): Symfony\Component\Console\Application->run() #16 {main} [] {"hostname":"ip-172-31-34-245","pid":832350} [2026-08-13T22:00:05.482010+00:00] mautic.WARNING: Command `mautic:segments:update` exited with status code 255 [] {"hostname":"ip-172-31-34-245","pid":832350}