My phpList install is on shared hosting. Host limits emails to 1000/hour. I’ve struggled to stay under that limit regardless of settings. Here are my current settings:
I process the queue using a cron job, set to run every 5 minutes (300 seconds). I would interpret my settings to send a batch of 50 emails with a delay of 4 seconds between each email each time the queue is processed. I think this means that it will take a max of 200 seconds (4 X 50) to send the batch. The MAILQUEUE_BATCH_PERIOD is set at a value to ensure (I think) that the batch completes before the next cron job run. Domain throttling is disabled.
I have two questions:
How is it possible that I exceed 1000 emails/hour in almost every campaign I run?
Why does actual batch size, as reported in the Event Log, vary from 21 to 50?
your logic is good, there are 3600 seconds in an hour, and if it sent continuosly with a delay of 4 seconds, that would be 900 outgoing messages an hour.
The cron job also send out notifications, and you have bounces and unsubscribes, as well as any additional emails going through that server that are not related to the campaigns… that might all add up to more than 1000 emails. Why don’t you send with a throttle of 8, and see if that would make a difference…
Thanks, Dan. I’ll try that. Two questions. With throttle of 8, batch would take 8 X 50 = 400 sec. Is there any need to complete a batch before the next cron job runs in 300 sec? Any idea why the actual run-time batch size varies so much? I would have thought it would send 50 every time.
At the beginning of a batch send, the system looks at number of emails sent in the last batch period (in your case 300 seconds). it will calculate how many to send this batch, based on that number… so if it sent 25 emails in the last 300 seconds, and your batch size is 50, it will schedule 25 emails to be sent in the new batch (which is allowed to go for 240 seconds).
I’m not sure if the system will terminate the batch after the period is up (240 sec), or if it will keep running until the batch quantity is sent… I usually run a cron every 6 minutes, and my period is 3600 seconds. With a batch size of 0 (unlimited), and I specify the throttle. My system runs until the campaign is sent (more than an hour)…
You might want to experiment with just changing the delay, and see what happens. I would expect it to send out the 50 emails in 50 x 8 = 400 seconds, then stop the sending. The next time the cron job runs, it should see how many emails were sent in the last 240 seconds (240 / 8 = 30 (max)) or 160/8 = 20 (min), and it will send out (50 - #sent) in the next batch.