Segment update is too slow with PHP warning

Your software
My Mautic version is: 4.4.7
My PHP version is: 7.4
My Database type and version is: 5.7.38

Your problem
My problem is:

The issue shows up once i run mautic:segments:update

These errors are showing in the log:

PHP Warning: Declaration of Mautic\LeadBundle\Model\ListModel::createForm($entity, Symfony\Component\Form\FormFactoryInterface $formFactory, $action = NULL, $options = Array) should be compatible with Mautic\CoreBundle\Model\FormModel::createForm($entity, $formFactory, $action = NULL, $options = Array) in /var/www/html/mautic/app/bundles/LeadBundle/Model/ListModel.php on line 201
PHP Warning: Declaration of Mautic\LeadBundle\Model\ListModel::dispatchEvent($action, &$entity, $isNew = false, ?Symfony\Contracts\EventDispatcher\Event $event = NULL) should be compatible with Mautic\CoreBundle\Model\FormModel::dispatchEvent($action, &$entity, $isNew = false, ?Symfony\Component\EventDispatcher\Event $event = NULL) in /var/www/html/mautic/app/bundles/LeadBundle/Model/ListModel.php on line 233

Steps I have tried to fix the problem:


  1. Plz check if you don’t have empty fields in your fliter.
    Sometimes some fields disappear, and segment update fails.

  2. Plz check if you are using segment membership as filter. That can slow things down.