Very slow spooling to segments we send to frequently. Occasionally hanging

My Mautic version is: 3.2.4
My PHP version is: 7.2.31
Database: MySQL 5.7.29

We’re suffering slow email spooling when sending to our employee segment while sending internal emails. The segment is approximately 850 contacts and we generally send to this segment around 3 times per week.

Spooling emails for this segment has become slower and slower over time and occasionally only spools up 100 emails before coming to a complete stop. We then must hit send again to get the next 100 in the spool.

Segments that we don’t send to as frequently tend to spool up without issue. I was wondering if this was a problem that others have come across and if there is any recommended maintenance to remedy this issue.

We purged old data using mautic:maintenance:cleanup, cleared the cache but we’re still having the problem with our internal contacts. We have also created a new employee segment, but this also spools up very slowly and still prone to hanging. I’m not seeing anything in the error logs that would indicate an issue either.

After upgrading to 3.2.4 the problem wasn’t as bad as it was in the previous version we were running (2.16.3) but over time we are back to having slow or stalled spooling.

Thanks in advance for any thoughts or advice.

Do you use any special switches in your “mautic:emails:send” cron?
Are you using Queue or Immediate send?


Thanks for the response. We’re using Queue and don’t have anything special in the cron job.

The issue only seems to surface when sending to our internal segment, which gets the most use. In a mailing yesterday it was slow generating the the first 800 emails but then seemed to stop, so we had to cancel and then start the mailing again for the last 50 or so. Sometimes it can stop after each batch of 100, so we have to cancel and then start the mailing again.

It’s an issue that’s gradually appeared over time it seems.

If you are using the queue - how exactly are you generating the emails? Just wait until the progress bar fills up during the email sending screen?

Pretty much. Then recently we’ve just been keeping an eye on the spool folder to make sure we can see how many have gone in/out. For instance, the progress indicator may say that 200 have been sent and stay there, however 300 may have gone in to the spool. Once we cancel and return to the email list, that correctly reflects that 300 hundred have been sent, so we hit send again and it picks up where it left off.

Okay, cool.
How often do you run your crons? Are you running multiple crons in the same minute?

The mautic:emails:send is running every couple of minutes and sending 30 at a time.

Other crons:
mautic:campaigns:trigger every 15 mins at - 10,25,40,55
mautic:campaigns:update every 15 mins at - 5,20,35,50
mautic:import every 15 mins at - 3,18,33,48
mautic:segments:update every 15 mins at 0,15,30,45

It’s been a couple of years since we set those up, so can’t remember how we came to that timing or if it’s remotely near optimal.


The only thing I can imagine is your server being really slow…

It’s just really odd how it only seems to affect that segment, or the contacts in that segment. other larger mailings seem to go without a hitch. If it was across the board I’d think the same. It’s had me scratching my head that’s for sure. Thanks for responding btw. Much appreciated!

Would be interesting to understand what segment filter you use.
It can be also the mail content that is different.

We basically repopulate the segment from our employee database weekly.

The email formats internally are significantly different to what we’re sending externally and usually contain a lot more links.