Hopefully someone can help.. First the particulars:
CiviCRM 5.1.2 / Wordpress
Sparkpost Extension: 1.1
Mailer Batch: 0
Mailer throttle: 0
Mailer job: 1000
Mailer Cron: 8
It appears that when sending out bulk emails, Civi is generating them one at a time (we turned off Smarty), which is impacting email performance.
How was I able to determine this ?
- Doing "tail -f" on the civi log, I saw a copy of every email being recorded, one at a time.
- A constant stream of activity on the database, with queries (civicrm_relationship) and recording of the email activity in the database. When the mails were finished, the database activity ceased.
- And the clincher... a continuous stream of sockets being opened and timing out. Running "netstat -an" and grep-ing the ip, I saw a few hundred connections to the same ip (though we are only running a batch of 8), and only the ports changing. The connections would time out, and new ports would come in..this was a pattern observed throughout the life of the email process.
Can someone please confirm that this is the expected behavior of Civi and if so, is there a way to batch emails. Also, is there a way to keep connections open ?