Improving MailWizz PCNTL sending

Lakjin

Active Member
I've recently been struggling with MailWizz campaigns being stuck at processing due to a restart in my MySQL database. The restart caused MailWizz PCNTL processes to be killed (lose connection) with the campaigns still being at the 'processing' stage; hence, when the send command is run again, it does not process these campaigns because it thinks they are already in the processing stage.

I have a suggestion on how to improve this -- keep track of PIDs. Whenever the send campaign command starts processing a campaign, it records the PID of the process in a temporary MailWizz table in association with the campaign UID (and removes the PID when a campaign leaves processing stage). Every time send campaign command is run, MailWizz checks the associated PIDs for all campaigns in the processing stage. If the PIDs in the temp table are not running, that means the campaign is stuck at processing and can be reverted to sending status and reprocessed. If the PIDs in the temp table are running, MailWizz would need to confirm the PID is currently associated with a MailWizz send campaign command (because PIDs can be reused); if it is, then the campaign is still being processed. If not, then the campaign is stuck.

What do you all think?
 
I've recently been struggling with MailWizz campaigns being stuck at processing due to a restart in my MySQL database. The restart caused MailWizz PCNTL processes to be killed (lose connection) with the campaigns still being at the 'processing' stage; hence, when the send command is run again, it does not process these campaigns because it thinks they are already in the processing stage.

I have a suggestion on how to improve this -- keep track of PIDs. Whenever the send campaign command starts processing a campaign, it records the PID of the process in a temporary MailWizz table in association with the campaign UID (and removes the PID when a campaign leaves processing stage). Every time send campaign command is run, MailWizz checks the associated PIDs for all campaigns in the processing stage. If the PIDs in the temp table are not running, that means the campaign is stuck at processing and can be reverted to sending status and reprocessed. If the PIDs in the temp table are running, MailWizz would need to confirm the PID is currently associated with a MailWizz send campaign command (because PIDs can be reused); if it is, then the campaign is still being processed. If not, then the campaign is stuck.

What do you all think?

Dear @twisted1919

Many users have the same problem... campaigns are stucked frequently...
I also suffer the same problem.... campaigns did not finish processing and requires manual reactivation

What do you think about the solution proposed by @Lakjin ??
 

twisted1919

Administrator
Staff member
There's absolutely no issue with campaign sending with pcntl. if the campaign remains stuck is just plain bad configuration of the system.
I cannot design a magic wand...
 

frm.mwz

Well-Known Member
There's absolutely no issue with campaign sending with pcntl. if the campaign remains stuck is just plain bad configuration of the system.
that is actually true in the sense that when properly configured and not overloaded, then it works fine.
but what happens is that most folks set it to high and over time the load becomes bigger as more users/customers/subscribers need to be handled, and then things get stuck.
and it is for those situations where it would be good to have a mechanism to get going again, which exists in a way via the unpause/restart options for each campaign, and some users probly want this to be more automated perhaps.

I cannot design a magic wand...
of course not, and no one is really asking for that.
 
Top