Rows from m_email_stats disappear after emails sent and sending restarts from some point

Your software
My Mautic version is: v2.16.1
My PHP version is: 7.2

Your problem
My problem is: Can’t really send all emails to segment and can’t get real data about number of emails has been sent

At the beginning I used queue options to send emails to segment, but I got my spool folder overflowed with 30 - 50MB .message(can’t understand why files have such a big size) files really quick. After I switched to “Send immideately” option and thought that every thing is OK.

But I noticed that same emails are send again and again and found that new entries from table m_email_stats disapper. I have wholes in ID’s. For example ID of m_email_stats is 326132 and the next one is 326974.

I watched table, saw new row of emails that had been send, and at the end of the dissappered. This happens all the time. I used simple command with mautic:broadcast:send --limit=1 and had same result. First I could see the email sent row in table and after command stopped it dissappeared from the table.

Value of pendign messages(see screenshot) for email goes down to 0, and again gets the max number and it is like circle.

chrome_2020-03-31_21-02-33 chrome_2020-03-31_21-03-02

Please give any advice. Don’t know what to do with my issue.

These errors are showing in the log:

Steps I have tried to fix the problem:

Often I can see PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) during mautic:broadcast:send, but I got lost rows from m_email_stats when it was OK and no errors occured