View Issue Details

IDProjectCategoryView StatusLast Update
1978ComposrGeneral / Uncategorisedpublic2015-07-05 18:31
ReporterLhasadreams Assigned ToChris Graham  
PriorityurgentSeverity@80@ 
Status resolvedResolutionfixed 
Summary1978: Cannot send out a Newsletter
DescriptionHi,
I scheduled a Newsletter to be sent to all site members, 30,000 odd, on vwgolfmk1.org.uk for 6pm last night. The time passed and nothing was sent. It then occurred to me that because our server is in the USA on CDT that it would not send until much later.
I found the event and cancelled it.
I then re created the Newsletter and re sent it immediately. Usually the web page times out but the Newsletter gets sent, but after an hour it was clear that it was not being sent. I did try sending again but the same thing happened.
Please can this be looked into as a matter of urgency as we hoped to get our last Newsletter out before our main show in 10 days.
Cheers Ade
TagsNo tags attached.
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2015-06-29 14:18

administrator   ~2930

Looking at this now.

Chris Graham

2015-06-29 14:39

administrator   ~2931

Sorry about this Ade. My new locking code was not playing well with the drip-send timer. It is now going out.

Lhasadreams

2015-06-29 14:52

developer   ~2932

Cool, thanks Chris

Lhasadreams

2015-06-30 09:23

developer   ~2936

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.

Chris Graham

2015-07-03 18:30

administrator   ~2939

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.

Chris Graham

2015-07-03 20:11

administrator   ~2942

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.

Lhasadreams

2015-07-05 18:31

developer   ~2943

Ok cool Chris.
We are going to send another newsletter out tonight - will let you know how that goes.
Thanks
Ade

Issue History

Date Modified Username Field Change
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised