• Hi Yehuda – Here’s an edge case for you…!

    We use Post SMTP to send out a bulk email jobs alert on one of our websites. Each day a Cron job runs to trigger a routine which queries a database of 19,000 users and sends emails to them, relayed to Mandrill API via the Post SMTP plugin.

    Over the past month, we saw the sending rate for this emails decrease dramatically from around 10-20 emails per minute, to just 2 or 3 per minute.

    We found that the decrease in email send rate only happened when the sending routine was triggered via wp_cron, not when the send task was triggered via a browser or SSH CLI call.

    Investigating further, we found that the Logging of emails to the Database in Post SMTP plugin caused the delays when the email task runs under wp_cron conditions – logging was taking up to 30 seconds per email. Disabling DB logging in your plugin, and the email send rate seems to increase again to 10-20 emails per minute.

    Previously we didn’t see this issue in the plugin – although, of course, it could be related to other changes in WordPress. But I thought I would let you know, in case you can work out any changes that may cause DB logging to slow down (when triggered via a Cron task) over the last few versions of the plugin.

    Thanks
    Marcus

  • The topic ‘Email logging to DB running slow under wp_cron conditions’ is closed to new replies.