[2026-08-11T22:00:05.331511+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 l.id as leadIdPrimary FROM mtc_leads l WHERE (EXISTS(SELECT null FROM mtc_leads par12 LEFT JOIN mtc_lead_lists_leads par14 ON par12.id = par14.lead_id and par14.leadlist_id = 16 and (par14.manually_removed = 1) WHERE (l.id = par12.id) AND (((par12.last_order_date LIKE :par13) AND (par14.lead_id IS NULL)) OR (EXISTS(SELECT null FROM mtc_lead_lists_leads par15 WHERE (par12.id = par15.lead_id) AND ((par15.leadlist_id = 16) AND ((par15.manually_added = 1) OR (par15.manually_removed = '')))))))) AND (l.id NOT IN (SELECT par16.lead_id FROM mtc_lead_lists_leads par16 WHERE par16.leadlist_id = :par16segmentId))) sss","parameters":{"par13":"2026-08-01%","par16segmentId":19}} {"hostname":"ip-172-31-34-245","pid":715528} [2026-08-11T22:00:05.363540+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(54): Mautic\LeadBundle\Segment\ContactSegmentService->timedFetch() #6 /sites/mautic5/docroot/app/bundles/LeadBundle/Model/ListModel.php(331): Mautic\LeadBundle\Segment\ContactSegmentService->getNewLeadListLeadsCount() #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":715528} [2026-08-11T22:00:05.375637+00:00] mautic.WARNING: Command `mautic:segments:update` exited with status code 255 [] {"hostname":"ip-172-31-34-245","pid":715528}