Pcntl reliable?

@twisted1919 Thanks.. This fixed the duplication error. But even after pcntl is enabled, I'm able to send out only 46 emails per minute. I sent to a list of 500 contacts only, that took nearly 12 minutes to complete. This is pretty much similar to what I used to get when PCNTL was disabled :(
 

Attachments

  • delivery.png
    delivery.png
    32.7 KB · Views: 23
I did another test to a list of 2K subscribers. Got 90 email per minute (Subscribers at once changed to 500, batches to 10). I noticed that 1 php5 thread was active in first case and 2 php5 threads were active at second cases. So each thread is able to process 45 emails/min in my case. So, as the number of emails increase, no.of processes increases and so does the speed. Will do a 10K test and post details ;)
 
Last edited:
Finished 10K list in 23 minutes - 434 emails a minute. So in my case the equation is 1 process ~ 45 emails.
500 subscribers - 1 process - 45 emails per minute - 12 mins completion time
2000 subscribers - 2 process - 90 emails per minute - 22 mins completion time
10K subscribers - 10 process - 434 emails per minute - 23 mins completion time

Look at the last 2 figures, looks crazy :D . I think as the batches in parallel is set to 10, it's not going to fork more than 10 threads for a campaign even if the list is bigger (correct me if I'm wrong). So if the speed is "x" for a single process and "n" is the no.of batches in parallel, then throughput is "nx" (provided there's enough subscribers in the list to fork "n" number of processes and that depends on no.of subscribers at once value).
 
It's going to fork as many processes as it can given you have enough resources to do like so.
That's the reason why i said i don't have a definitive answers for what settings to use, you have to test and see what settings fit your use case best.
 
I had the same issue.
I tried to install the SendCampaignsCommand.php you provided and the duplicate email problem is gone.

Unfortunately the sending speed is now very low :(
I sent 3.000 email in 30min.
With Redis I was able to send more than 10.000 email in 30min

Can you help me in some way?

thanks
 
@treddi - We just have to forget about redis for now, it really wasn't one of my best decisions i made with mailwizz.
Bow, to your issue, i really can't see how you can send just 3k emails in 30 minutes, even the regular, default, sending method can do way better than that.
Do me a favour first of all and disable pcntl sending, then enable send-campaigns command debugging as shown here: https://forum.mailwizz.com/threads/debug-send-campaigns-command.523/ and try some tests from command line and see how much it takes and where mailwizz spends it's time. Might be the latency between the server where mailwizz is hosted and the smtp server, or might be a slow mailwizz server because it lack resources. Eitherway would be, the above debug will help.
 
here the result

2016-03-07 09:29:46] - Loading 5 campaigns, starting with offset 0...
[2016-03-07 09:29:46] - Found 1 campaigns and now starting processing them...
[2016-03-07 09:29:46] - Campaign Worker #0 looking into the campaign with ID: 76
[2016-03-07 09:29:46] - This campaign belongs to XXX(uid: XXX).
[2016-03-07 09:29:46] - Changing the campaign status into PROCESSING!
[2016-03-07 09:29:47] - Looking for subscribers for campaign with uid XXX...(This is subscribers worker #0)
[2016-03-07 09:29:47] - This subscribers worker(#0) will process 4 subscribers for this campaign...
[2016-03-07 09:29:47] - Running subscribers cleanup...
[2016-03-07 09:29:47] - Checking subscribers count after cleanup: 4
[2016-03-07 09:29:47] - Entering the foreach processing loop for all 4 subscribers...

[2016-03-07 09:29:47] - XXX@gmail.com - 1/4
[2016-03-07 09:29:47] - Checking if we can send to domain of XXX@gmail.com...
[2016-03-07 09:29:47] - Checking if XXX@gmail.com is blacklisted...
[2016-03-07 09:29:47] - Checking if the server is over quota...
[2016-03-07 09:29:47] - Checking if the customer is over quota...
[2016-03-07 09:29:47] - Preparing the entire email...
[2016-03-07 09:29:48] - Using delivery server: web-api.mandrill.com (ID: 1).
[2016-03-07 09:29:48] - Sending the email message using the DIRECT method.
[2016-03-07 09:29:49] - Sending response is: OK
[2016-03-07 09:29:49] - Sending OK.
[2016-03-07 09:29:49] - Done for XXX@gmail.com, logging delivery...

[2016-03-07 09:29:49] - XXX@mail-tester.com - 2/4
[2016-03-07 09:29:49] - Checking if we can send to domain of XXX@mail-tester.com...
[2016-03-07 09:29:49] - Checking if XXX@mail-tester.com is blacklisted...
[2016-03-07 09:29:49] - Checking if the server is over quota...
[2016-03-07 09:29:49] - Checking if the customer is over quota...
[2016-03-07 09:29:49] - Preparing the entire email...
[2016-03-07 09:29:49] - Using delivery server: web-api.mandrill.com (ID: 1).
[2016-03-07 09:29:49] - Sending the email message using the DIRECT method.
[2016-03-07 09:29:49] - Sending response is: OK
[2016-03-07 09:29:49] - Sending OK.
[2016-03-07 09:29:49] - Done for XXX@mail-tester.com, logging delivery...

[2016-03-07 09:29:49] - XXX@cgworldgroup.com - 3/4
[2016-03-07 09:29:49] - Checking if we can send to domain of XXX@cgworldgroup.com...
[2016-03-07 09:29:49] - Checking if XXX@cgworldgroup.com is blacklisted...
[2016-03-07 09:29:49] - Checking if the server is over quota...
[2016-03-07 09:29:49] - Checking if the customer is over quota...
[2016-03-07 09:29:49] - Preparing the entire email...
[2016-03-07 09:29:49] - Using delivery server: web-api.mandrill.com (ID: 1).
[2016-03-07 09:29:49] - Sending the email message using the DIRECT method.
[2016-03-07 09:29:50] - Sending response is: OK
[2016-03-07 09:29:50] - Sending OK.
[2016-03-07 09:29:50] - Done for XXX@cgworldgroup.com, logging delivery...

[2016-03-07 09:29:51] - XXX@gmail.com - 4/4
[2016-03-07 09:29:51] - Checking if we can send to domain of XXX@gmail.com...
[2016-03-07 09:29:51] - Checking if XXX@gmail.com is blacklisted...
[2016-03-07 09:29:51] - Checking if the server is over quota...
[2016-03-07 09:29:51] - Checking if the customer is over quota...
[2016-03-07 09:29:51] - Preparing the entire email...
[2016-03-07 09:29:51] - Using delivery server: web-api.mandrill.com (ID: 1).
[2016-03-07 09:29:51] - Sending the email message using the DIRECT method.
[2016-03-07 09:29:51] - Sending response is: OK
[2016-03-07 09:29:51] - Sending OK.
[2016-03-07 09:29:51] - Done for XXX@gmail.com, logging delivery...

[2016-03-07 09:29:51] - Done processing 4 subscribers!
[2016-03-07 09:29:51] - Campaign has been marked as sent!
 
Testing on 4 subscribers doesn't really show anything, prepare that 30k campaign and test on that.
As far as i can see though, you don't have pcntl active on your server.
What does this command output:
Code:
php -m | grep pcntl
?
 
Code:
php -m | grep pcntl
pcntl

As you asked I disabled the pcntl from the backend before the test.

Today I sent a REAL newsletter to my 30.000 subscribers using "Php Mail delivery server" and PCNTL disabled.
It tooks 1h and 45min. This is a good time for me.

This time is by far much better than the test I had with Mandrill (3.000 in 30min).
Does php mail is faster than Mandrill API?

Do you think I safely can try to enable PCNTL next time? Or it's better to wait for the next "official" version?

thanks
 
Does php mail is faster than Mandrill API?
It's not that is faster, it's just with mandrill, since it's an external service, the latency plays an important role.

Do you think I safely can try to enable PCNTL next time? Or it's better to wait for the next "official" version?
If you have applied the patch, you should be fine, but the golden rule is to test before sending ;)
 
We have updated the SendCampaignsCommand.php but in some sendings sends more mails than subscribers.

2a634p5.png
 
@Superyo - First counter tells the number of confirmed subscribers. This number can decrease if subscribers get blacklisted or they unsubscribe.
 
In a campaign already sent?... It doesn't make much sense... If the campaign is sent it should display the number of the subscribers at that moment... I think that behavior is confusing.
 
Unfortunately, it works like that.. also, the approx. time taken for email delivery will also go wrong due to the fact that it considers confirmed subscribers count instead of total subscribers (to whom the campaign is actually sent) for the calculations. :)
 
It's going to fork as many processes as it can given you have enough resources to do like so.
That's the reason why i said i don't have a definitive answers for what settings to use, you have to test and see what settings fit your use case best.
Is there a way for mwz to pull the initial resource info (ram, cpu, etc) and optimize these settings for max performance (with a bit of a buffer)? It could perhaps even check each (few) minute(s) if there is a resource change and adapt (so flex cloud could be utilized max)? I know it is probly asking much, but you are the only one (it seems) who could find a way :)
 
Back
Top