Increase automation speed?

Growthlabs

New Member
After the user has opted in it takes less than a second for the subscriber to be added to the list.

Once added to the list it is taking almost a minute for that first email to go out. Is there any way to speed it up so soon as the user is opted in to send that email instantly?

Processor
3.3GHz Hexa-Core E-2136 Coffee Lake Xeon
Memory
16 GB
Primary Hard Drive
480GB SSD
Data Center Location
LAX2 (Los Angeles, CA)
Operating System
CentOS 7.x
Managed Services
Self Managed
Bandwidth
20 TB on 1Gbps port
Internal Network
1 Gbps
Port Speed
1GBPS

Server stats shouldn't be an issue? Is it a configuration inside of mailwizz?

Thanks
 

laurentiu

Active Member
Staff member Support Staff

twisted1919

Administrator
Staff member
@Growthlabs - Beside the above article, it's important to note that the cron jobs frequency is per minute basis, so the cron job that triggers the email sending will run each minute, not earlier. This is what most likely introduces that 1 minute delay you talk about.
Personally i don't see a issue with this. But if you need to send it a bit faster than this one minute, you have to first split processing reguar campaigns and autoresponders, like shown here: https://kb.mailwizz.com/articles/process-regular-campaigns-and-autoresponders-separately/
Then, you when your cron job looks like:
Code:
* * * * * /usr/bin/php -q /home/domain/public_html/apps/console/console.php send-campaigns --campaigns_type=autoresponder >/dev/null 2>&1
You can then transform it in something like:
Code:
* * * * * /usr/bin/php -q /home/domain/public_html/apps/console/console.php send-campaigns --campaigns_type=autoresponder >/dev/null 2>&1
* * * * * sleep 20 && /usr/bin/php -q /home/domain/public_html/apps/console/console.php send-campaigns --campaigns_type=autoresponder >/dev/null 2>&1
* * * * * sleep 40 && /usr/bin/php -q /home/domain/public_html/apps/console/console.php send-campaigns --campaigns_type=autoresponder >/dev/null 2>&1
So what the above does is it will still run each minute, but now each minute it will start 3 cron jobs one that will start instantly, then next one after 20 seconds then next one after 40 seconds, which means that in a minute you will have 3 cron jobs running not just one, so the time to the first email will decrease.
Now, i don't advise having less than 10 seconds sleep time, bad things can happen if you don't give it enough time for processing, so don't force this.
 
Top