#1978 - Cannot send out a Newsletter

This is a spacer post for a website comment topic. The content this topic relates to: #1978 - Cannot send out a Newsletter
Looking at this now.
Sorry about this Ade. My new locking code was not playing well with the drip-send timer. It is now going out.
Cool, thanks Chris
Emails all sent although people have reported that they received it up to 9 times !! All at the same send time as well - I got it 7 times.
I'm really sorry to hear this happened yet again :(.

I am really wondering if it is Mandrill at this point, as it's not something other users have had, and we have a lock in place for the newsletter drip sender now.

While I was fixing this bug, I observed about 30k emails in the queue. So it's definitely not an issue entering the queue, as we'd expect to see the duplicates at that point in that case.

In sources/hooks/systems/cron/newsletter_drip_send.php we use 'newsletter_currently_dripping' as a lock. If it is set, it skips a drip cycle. It is set while starting a drip cycle and only unset after the mails for the cycle have been deleted from the queue. That means any concurrency issues should be impossible, as it will either skip concurrency via lock, or lock when writing the lock and achieve the same end.

You may want to check my code in case somehow I missed something, but I think it's sound.

I am considering what could be going wrong with Mandrill now.
After a lot of thought, I finally worked it out. Sorry I didn't get it sorted before.

The newsletter queue was feeding to the mail queue, and the mail queue had no locking.

I have made the newsletter queue send direct, which I thought was the case.

i have also implemented locking on the mail queue in case lots does end up dumping into there.

The reason it only affects you is the latency of Mandrill considerably raises the probability of CRON jobs overlapping.
Ok cool Chris.
We are going to send another newsletter out tonight - will let you know how that goes.
Thanks
Ade
0 guests and 0 members have recently viewed this.